{"id":23036849,"url":"https://github.com/degraciamathieu/php-line-length-detector","last_synced_at":"2025-08-14T17:32:32.064Z","repository":{"id":119452244,"uuid":"574640251","full_name":"DeGraciaMathieu/php-line-length-detector","owner":"DeGraciaMathieu","description":"A simple way to analyze the line length of your PHP files.","archived":false,"fork":false,"pushed_at":"2023-07-15T16:11:11.000Z","size":9050,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-13T13:41:34.407Z","etag":null,"topics":["ci","metrics","php","quality","static-analyzer"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeGraciaMathieu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-12-05T18:52:12.000Z","updated_at":"2023-07-25T20:08:21.000Z","dependencies_parsed_at":"2023-09-30T07:15:50.593Z","dependency_job_id":null,"html_url":"https://github.com/DeGraciaMathieu/php-line-length-detector","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"e9bd3cf92e94f26e588d5b0284da230ee61b99b6"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeGraciaMathieu%2Fphp-line-length-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeGraciaMathieu%2Fphp-line-length-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeGraciaMathieu%2Fphp-line-length-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeGraciaMathieu%2Fphp-line-length-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeGraciaMathieu","download_url":"https://codeload.github.com/DeGraciaMathieu/php-line-length-detector/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229851250,"owners_count":18134184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","metrics","php","quality","static-analyzer"],"created_at":"2024-12-15T17:27:55.641Z","updated_at":"2024-12-15T17:27:56.141Z","avatar_url":"https://github.com/DeGraciaMathieu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/DeGraciaMathieu/php-smelly-code-detector/blob/master/arts/robot.png\" width=\"250\"\u003e\n\u003c/p\u003e\n\n[![testing](https://github.com/DeGraciaMathieu/php-line-length-detector/actions/workflows/testing.yml/badge.svg)](https://github.com/DeGraciaMathieu/php-line-length-detector/actions/workflows/testing.yml)\n![Packagist Version](https://img.shields.io/packagist/v/degraciamathieu/php-line-length-detector)\n![Packagist PHP Version](https://img.shields.io/packagist/dependency-v/degraciamathieu/php-line-length-detector/php)\n\n# php-line-length-detector\n\nA simple way to analyze the line length of your PHP files.\n\n# Installation\n\n```\nRequires \u003e= PHP 8.1\n```\n\n## Phar\nThis tool is distributed as a [PHP Archive (PHAR)](https://www.php.net/phar):\n\n```\nwget https://github.com/DeGraciaMathieu/php-line-length-detector/raw/master/builds/php-line-length-detector\n```\n\n```\nphp php-line-length-detector --version\n```\n\n## Composer\nAlternately, you can directly use composer :\n\n```\ncomposer require degraciamathieu/php-line-length-detector --dev\n```\n# Usage\n\n```\nphp php-line-length-detector inspect {path}\n```\n\n```\n$ php php-line-length-detector inspect app\n\n❀ PHP Line Lenght Detector ❀\n+-------------+--------------+--------------+\n| total lines | largest line | average line |\n+-------------+--------------+--------------+\n| 1068        | 197          | 37           |\n+-------------+--------------+--------------+\n+--------+------------+---------+\n| length | occurrence | percent |\n+--------+------------+---------+\n| \u003e 160  | 2          | 0 %     |\n| \u003e 120  | 5          | 0 %     |\n| \u003e 80   | 29         | 2 %     |\n| \u003e 60   | 111        | 10 %    |\n| \u003e 30   | 618        | 57 %    |\n+--------+------------+---------+\n```\nYou can configure thresholds with the `--thresholds=` option (default : 160,120,80,60,30) :\n```\n$ php php-line-length-detector inspect app --thresholds=120,60\n\n❀ PHP Line Lenght Detector ❀\n+-------------+--------------+--------------+\n| total lines | largest line | average line |\n+-------------+--------------+--------------+\n| 1068        | 197          | 37           |\n+-------------+--------------+--------------+\n+--------+------------+---------+\n| length | occurrence | percent |\n+--------+------------+---------+\n| \u003e 120  | 5          | 0 %     |\n| \u003e 60   | 111        | 10 %    |\n+--------+------------+---------+\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdegraciamathieu%2Fphp-line-length-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdegraciamathieu%2Fphp-line-length-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdegraciamathieu%2Fphp-line-length-detector/lists"}