PHPackages                             degraciamathieu/php-line-length-detector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. degraciamathieu/php-line-length-detector

ActivePackage[DevOps &amp; Deployment](/categories/devops)

degraciamathieu/php-line-length-detector
========================================

PHP code smell detector

v0.1.0(2y ago)43MITPHPPHP ^8.1

Since Jul 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/DeGraciaMathieu/php-line-length-detector)[ Packagist](https://packagist.org/packages/degraciamathieu/php-line-length-detector)[ RSS](/packages/degraciamathieu-php-line-length-detector/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (2)Used By (0)

[![](https://github.com/DeGraciaMathieu/php-smelly-code-detector/raw/master/arts/robot.png)](https://github.com/DeGraciaMathieu/php-smelly-code-detector/blob/master/arts/robot.png)

[![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)[![Packagist Version](https://camo.githubusercontent.com/0e3a01359d88348c16a34f03287e49eb310c8a24feddd8054d1c899097772071/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656772616369616d6174686965752f7068702d6c696e652d6c656e6774682d6465746563746f72)](https://camo.githubusercontent.com/0e3a01359d88348c16a34f03287e49eb310c8a24feddd8054d1c899097772071/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656772616369616d6174686965752f7068702d6c696e652d6c656e6774682d6465746563746f72)[![Packagist PHP Version](https://camo.githubusercontent.com/33b7c9b1055acbdf95c708d30fe2e7b7aea1e03071a51970e6e67ed8dc5b9e66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f64656772616369616d6174686965752f7068702d6c696e652d6c656e6774682d6465746563746f722f706870)](https://camo.githubusercontent.com/33b7c9b1055acbdf95c708d30fe2e7b7aea1e03071a51970e6e67ed8dc5b9e66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f64656772616369616d6174686965752f7068702d6c696e652d6c656e6774682d6465746563746f722f706870)

php-line-length-detector
========================

[](#php-line-length-detector)

A simple way to analyze the line length of your PHP files.

Installation
============

[](#installation)

```
Requires >= PHP 8.1

```

Phar
----

[](#phar)

This tool is distributed as a [PHP Archive (PHAR)](https://www.php.net/phar):

```
wget https://github.com/DeGraciaMathieu/php-line-length-detector/raw/master/builds/php-line-length-detector

```

```
php php-line-length-detector --version

```

Composer
--------

[](#composer)

Alternately, you can directly use composer :

```
composer require degraciamathieu/php-line-length-detector --dev

```

Usage
=====

[](#usage)

```
php php-line-length-detector inspect {path}

```

```
$ php php-line-length-detector inspect app

❀ PHP Line Lenght Detector ❀
+-------------+--------------+--------------+
| total lines | largest line | average line |
+-------------+--------------+--------------+
| 1068        | 197          | 37           |
+-------------+--------------+--------------+
+--------+------------+---------+
| length | occurrence | percent |
+--------+------------+---------+
| > 160  | 2          | 0 %     |
| > 120  | 5          | 0 %     |
| > 80   | 29         | 2 %     |
| > 60   | 111        | 10 %    |
| > 30   | 618        | 57 %    |
+--------+------------+---------+

```

You can configure thresholds with the `--thresholds=` option (default : 160,120,80,60,30) :

```
$ php php-line-length-detector inspect app --thresholds=120,60

❀ PHP Line Lenght Detector ❀
+-------------+--------------+--------------+
| total lines | largest line | average line |
+-------------+--------------+--------------+
| 1068        | 197          | 37           |
+-------------+--------------+--------------+
+--------+------------+---------+
| length | occurrence | percent |
+--------+------------+---------+
| > 120  | 5          | 0 %     |
| > 60   | 111        | 10 %    |
+--------+------------+---------+

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1031d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b7c883dad74109462c750a2bafef33c1d26da31c68e90b686cc0aa355b57feaf?d=identicon)[DeGraciaMathieu](/maintainers/DeGraciaMathieu)

---

Top Contributors

[![DeGraciaMathieu](https://avatars.githubusercontent.com/u/11473997?v=4)](https://github.com/DeGraciaMathieu "DeGraciaMathieu (15 commits)")

---

Tags

cimetricsphpqualitystatic-analyzerphpMetricsqualitycistatic analyzersmell

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/degraciamathieu-php-line-length-detector/health.svg)

```
[![Health](https://phpackages.com/badges/degraciamathieu-php-line-length-detector/health.svg)](https://phpackages.com/packages/degraciamathieu-php-line-length-detector)
```

###  Alternatives

[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

9989.0k](/packages/mehrancodes-laravel-harbor)[renoki-co/laravel-healthchecks

Laravel Healthchecks is a simple controller class that helps you build your own healthchecks endpoint without issues.

5654.9k](/packages/renoki-co-laravel-healthchecks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
