aluisio/laravel-code-analyzer

Create new artisan commands to simplify your code quality workflow

v1.3.5 2025-03-17 12:42 UTC

This package is auto-updated.

Last update: 2025-03-17 12:43:17 UTC


README

Laravel Code Analyzer provides convenient Artisan commands to simplify your code quality workflow. It integrates common PHP static analysis tools into your Laravel project, making it easy to maintain clean, efficient, and high-quality code.

Installation

Install the package via Composer:

composer require aluisio/laravel-code-analyzer --dev

Laravel should automatically discover the service provider. If not, add the following service provider to your config/app.php file:

Aluisio\LaravelCodeAnalyzer\LaravelCodeAnalyzerServiceProvider::class,

Usage

The package provides the following Artisan commands:

Run Pint

php artisan pint

Pass additional arguments directly to Pint:

php artisan pint --test

Run PHPStan

php artisan phpstan analyse

Pass additional arguments directly to PHPStan:

php artisan phpstan analyse --memory-limit=2G

Run Rector

php artisan rector

Pass additional arguments directly to Rector:

php artisan rector --dry-run

Run All Analysis Commands

Run all analysis commands sequentially (Pint, Rector, PHPStan):

php artisan analyse

Requirements

  • Laravel
  • Pint
  • Rector
  • PHPStan

Author

Aluisio Pires
Email: aluisiopireseng@gmail.com

© 2025 Aluisio Pires