Laravel Stats is a package inspired by
rake stats that gives you code statistics for your Laravel projects:
The output provides metrics grouped into Commands, Controllers, Migrations, Models, Seeders, and Service Providers. Inspired by rake stats (now
rails stats), the goal is to provide code insights like lines of code, code to test ratio, and methods per class.
artisan stats command is missing testing statistics, but the work so far looks promising. A quick glance at the issues shows some milestones in place to provide things like test statistics.
The package provides the following configuration options at the time of writing:
1<?php23return [4 /*5 * Ever project is different and sometimes files6 * and folders should be ignored and never7 * count towards the project stats.8 */9 'ignore' => [1011 /*12 * Ignore the contents of an entire folder13 */14 'folders' => [15 // 'app/Http/Controllers'16 ],1718 /*19 * Ignore certain file names or extensions20 */21 'files' => [22 // 'helpers.php'23 // 'twig.php'24 ],2526 ],27];
Check out laravel-stats on GitHub.