Last Updated: December 05, 2019
·
3.926K
· emjayess

Get PHP Insights on a Laravel project in seconds

PHPInsights is an awesome way to get insights on improving a codebase. Here's my shell alias/function that adds a package to a Laravel project, publishes the configuration, and runs the analysis job...

  1. cd into your project, type getinsights
  2. make coffee, come back and begin improving code
  3. profit?
getinsights() {
    composer require nunomaduro/phpinsights --dev
    php artisan vendor:publish --provider="NunoMaduro\PhpInsights\Application\Adapters\Laravel\InsightsServiceProvider"
    php artisan insights
}

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside