CLI tool for quick size measure of PHP project, used PHP features and more. Zero dependencies. Runs anywhere
CLI tool for quick size measure of PHP project, used PHP features and more. Zero dependencies. Runs anywhere
CLI tool for quick size measure of PHP project, and real used PHP features.
Zero dependencies. Runs anywhere.
The package is scoped and downgraded to PHP 7.2. So you can install it anywhere with any set of dependencies:
composer require tomasvotruba/lines --devvendor/bin/lines measureBy default, we measure the root directory. To narrow it down, provide explicit path:
vendor/bin/lines measure srcFor short output:
vendor/bin/lines measure --shortFor json output, just add --json:
vendor/bin/lines measure --jsonAlso, you can combine them (very handy for blog posts and tweets):
vendor/bin/lines measure --short --jsonFor the text output, you'll get data like these:
…Or in a json format:
…Are you looking for top 10 longest files?
vendor/bin/lines measure --longest…/vendorThis tool measures your code, not the 3rd party libraries. It skips /vendor directory by default to avoid false positives. If you want to measure vendor files too, use --allow-vendor option:
vendor/bin/lines measure vendor/rector/rector --allow-vendorTwo codebases using PHP 8.4 in composer.json, are not the same codebases. One has zero type param/return/property declarations, other has promoted properties. Reveal their real value by counting PHP feature they actually use.
vendor/bin/lines features srcFor json output, just add --json:
vendor/bin/lines features src --jsonThis command:
For the text output, you'll get data like these:
…Or in a json format:
…That's it. Happy coding!
No open issues yet, or sync has not completed.