Laravel Stats 2.0 is Here

Laravel Stats 2.0 is Here

Laravel Stats 2.0 was released recently with a bunch of changes and exciting features! If you’re not familiar, Laravel Stats is a rake-inspired package that gives you code statistics for your Laravel projects.

We originally covered Laravel Stats: Code Statistics for your Laravel Projects earlier this year, but it’s time to look at the shiny new features just released:

Differentiation between Application Code and Test Code

One of the stats is the ratio between application code and test code. In 2.0, each component can now be explicitly configured to count towards application or test code.

Verbose Mode

A new verbose flag (--verbose|-v) will list all the recognized classes for a component.

Filter Output by Component

A new --components flag was added to filter output by component type. An example of this flag is available in the readme:

php artisan stats --components=Migrations,Models
+------------+---------+---------+---------------+-----+------+-------------+
| Name       | Classes | Methods | Methods/Class | LoC | LLoC | LLoC/Method |
+------------+---------+---------+---------------+-----+------+-------------+
| Migrations |       3 |       6 |             2 | 103 |   31 |        5.17 |
| Models     |       1 |       0 |             0 |  39 |    8 |           0 |
+------------+---------+---------+---------------+-----+------+-------------+
| Total      |      29 |      31 |          1.07 | 950 |  167 |        5.39 |
+--- Code LLoC: 155 * Test LLoC: 12 * Code/Test Ratio: 1:0.1 * Routes: 2 ---+

You can see a list of component types in the project’s component classification table.

Learn More

If you are upgrading from a previous version or are curious for more 2.0 details, check out the notes for Release v2.0.0. You can learn more about this package, get full installation instructions, and view the source code on GitHub at stefanzweifel/laravel-stats.


Filed in: News / packages


Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Senior Laravel Engineer
Remote okay (must already live in USA)
Hawthorne Effect
Senior Software Engineer (Remote - Contract)
Remote
Koodi Systems
PHP Developer
Pittsburgh / Remote
Sequoia Waste Solutions
Software Developer
Eindhoven
Simac IDS
Application Developer Level II (CakePHP / MySql / Vue.js)
Lancaster, PA
Harbor Compliance
FULL STACK LARAVEL DEVELOPER
LONDON - WEST END
AMPERSAND HEATLH
Mid/Senior Laravel Developer - U.S. Developers Only
Kenner, Louisiana
Profit Miner Technologies