jumptwentyfour / laravel-coding-standards
我们的PHP应用程序的编码规范。
V3.0.0
2024-07-05 11:33 UTC
Requires
- php: ^7.2|^8.0
- jumptwentyfour/php-coding-standards: ^v3.0.0
- larastan/larastan: ^2.7.0
- laravel/framework: ^9.0|^10.0|^11.0
- nikic/php-parser: ^5.0
Requires (Dev)
- phpunit/phpunit: ^9.3
- dev-main
- V3.0.0
- v2.5.0
- V2.4.1
- V2.4.0
- V2.3.0
- v2.2.1
- v2.2.0
- V2.1.0
- V2.0.2
- v2.0.1
- v2.0.0
- v0.0.5
- v0.0.4
- v0.0.3
- v0.0.2
- v0.0.1
- dev-feature/updating-to-latest-ecs
- dev-feature/bump-laravel-11
- dev-update-larastan-organisation
- dev-feature/bump-larastan-version
- dev-feature/update-readme
- dev-feature/add-uninitialized-stan-check
- dev-feature/add-migration-up-if-exists-check
- dev-feature/add-codeowners
- dev-feature/laravel-10
- dev-feature/laravel-10-update
- dev-update-ecs-setup
- dev-feature/MB-27-upgrade-docserver
- dev-feature/updating-larastan-version
- dev-feature/new-larastan-release
This package is auto-updated.
Last update: 2024-09-05 11:56:45 UTC
README
在 Jump24,我们自豪于严格控制我们的编码规范,这就是我们构建这个包的原因。
安装
要安装此包,只需使用composer
composer require jumptwentyfour/laravel-coding-standards
设置
安装完成后,您将可以访问我们的PHPStan配置文件,您可以轻松地将它添加到您的phpstan.neon
文件中
includes: - ./vendor/jumptwentyfour/laravel-coding-standards/phpstan.neon
运行
要运行代码规范检查,只需运行以下命令
./vendor/bin/ecs check
这将为您运行配置的代码规范检查,并反馈您的代码状态以及需要实施哪些改进
扩展
这些编码规范是可扩展的,您只需在项目根目录下创建自己的ecs.php
文件,并复制以下内容进行扩展即可
<?php declare(strict_types=1); return ECSConfig::configure() ->withSets([getcwd() . '/vendor/jumptwentyfour/php-coding-standards/ecs.php']) ->withPaths( [ __DIR__ . '/ecs.php', __DIR__ . '/src', ] );