PHPInsights is a composer package created by Nuno Maduro and is a fantastic tool to get started with analyzing the code quality of your PHP applications. Whether you are a pro at code quality tools or a complete newbie - PHPInsights has a steady learning curve that you can quickly adapt to as your knowledge improves.
It allows you to gain insights into the quality of your code, your coding style, your application architecture, and the complexity of your code.
declare(strict_types=1); return [ 'preset' => 'laravel', 'exclude' => [ 'database/*', ], ]; You can configure specific insights within your configuration file, which allows you to set the options for things such as Line Length. declare(strict_types=1); use PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff; return [ 'preset' => 'laravel', 'exclude' => [ 'database/*', ], 'config' => [ LineLengthSniff::class => [ 'lineLimit' => 120, 'absoluteLineLimit' => 160, ], ], ]; If we rerun PHPInsights now, we will run it with our configuration, which will be more specific to our configured specifications.