Refactoring #6: Improve Code Quality in Laravel using Rector

Auto import class names

Changing the string class name to a class constant

Arrow functions from PHP 7.4

Inline useless variables

Combine the assignment operator

Simplify the if return statements

Throw error on JSON operations

Convert compact usages into arrays

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Geni Jaho

Geni Jaho

Full-stack web developer with a passion for software architecture and programming best practices.