jumptwentyfour / laravel-coding-standards
Coding standards for our PHP applications.
Installs: 92 088
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 1
Open Issues: 2
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-12-05 12:34:24 UTC
README
At Jump24 we pride ourselves on keeping our coding standards under tight control, this is why we built this package.
Installation
To install this package, simply use composer:
composer require jumptwentyfour/laravel-coding-standards
Setup
Once installed you will have access to our PHPStan configuration file, which you can easily add to your phpstan.neon
:
includes: - ./vendor/jumptwentyfour/laravel-coding-standards/phpstan.neon
Running
To run the code standard checks, simply run the following command:
./vendor/bin/ecs check
This will run the configured code standard checks for you, giving you feedback on where your code is and what improvements you need to implement
Extending
These code standards are extendable, all you need to do is create your own ecs.php
in the root directory of your project and copy the following and extend as required:
<?php declare(strict_types=1); return ECSConfig::configure() ->withSets([getcwd() . '/vendor/jumptwentyfour/php-coding-standards/ecs.php']) ->withPaths( [ __DIR__ . '/ecs.php', __DIR__ . '/src', ] );