TomasVotruba / lines

CLI tool for quick size measure of PHP project, runs anywhere
https://tomasvotruba.com/blog/easy-and-quick-way-to-measure-lines-of-code-in-php
MIT License
163 stars 4 forks source link

Add bare files support + merge constants and functions to structure overview #23

Closed TomasVotruba closed 1 year ago

TomasVotruba commented 1 year ago

Overview with classes and functions does not make sense, as now there are also triats, functions, global constants, enums etc. To keep data readable, class constant and global constants are now moved to structure overview :+1:

{
    "filesystem": {
        "directories": 1887,
        "files": 7673
    },
    "lines_of_code": {
        "code": 521791,
        "code_relative": 70.3,
        "comments": 220205,
        "comments_relative": 29.7,
        "total": 741996
    },
    "lengths": {
        "class_max": 987,
        "class_average": 7,
        "method_max": 568,
        "method_average": 3.9
    },
    "structure": {
        "namespaces": 1700,
        "classes": 6248,
        "class_methods": 36663,
        "class_constants": 3351,
        "interfaces": 1070,
        "traits": 98,
        "enums": 3,
        "functions": 6254,
        "global_constants": 35
    },
    "methods": {
        "non_static": 32063,
        "non_static_relative": 87.5,
        "static": 4600,
        "static_relative": 12.5,
        "public": 28964,
        "public_relative": 79,
        "protected": 2484,
        "protected_relative": 6.8,
        "private": 5215,
        "private_relative": 14.2
    }
}