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
Laravel News Partners

Laravel Jobs

PHP Developer - Full time w/ benefits, US Only
Northern Virginia or Remote (US Only)
Guidance Residential
Full Stack Developer
Remote
Wehaa.com
Laravel API Developer
Las Vegas, NV (Must work on-site)
V Shred
Laravel Developer (Vue, SQL Server)
Remote
World Trade Organization
Web Application Developer (Vue.js & Laravel)
Remote
Apero Creative Development

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.