承接 degraciamathieu/php-line-length-detector 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

degraciamathieu/php-line-length-detector

最新稳定版本:v0.1.0

Composer 安装命令:

composer require degraciamathieu/php-line-length-detector

包简介

PHP code smell detector

README 文档

README

testing Packagist Version Packagist PHP Version

php-line-length-detector

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

Installation

Requires >= PHP 8.1

Phar

This tool is distributed as a PHP Archive (PHAR):

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

Composer

Alternately, you can directly use composer :

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

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 %    |
+--------+------------+---------+

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-15