buckhamduffy / coding-standards
Installs: 50 454
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 3
Requires
- php: >=8.2.1
- captainhook/captainhook: ^5.23
- driftingly/rector-laravel: 1.2.2
- larastan/larastan: 2.9.8
- laravel/framework: ^11.14.0
- phpstan/phpstan: ^1.11.6
- rector/rector: ^1.2.0
- symfony/process: ^7.1
- symplify/easy-coding-standard: 12.3.5
Requires (Dev)
- captainhook/hook-installer: ^1.0
- phpunit/phpunit: ^11.2.6
- spatie/laravel-data: ^4.7.1
- spatie/laravel-ray: ^1.37
This package is auto-updated.
Last update: 2024-11-05 14:24:23 UTC
README
Usage
Run composer require --dev buckhamduffy/coding-standards
ECS Example
ecs.php
<?php declare(strict_types=1); use Symplify\EasyCodingStandard\Configuration\ECSConfigBuilder; use PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\EmptyStatementSniff; /** @var ECSConfigBuilder $config */ $config = require __DIR__ . '/vendor/buckhamduffy/coding-standards/ecs.php'; $config ->withParallel() ->withSpacing(indentation: Option::INDENTATION_SPACES, lineEnding: "\n"); return $config;
Rector Example
rector.php
<?php use Rector\ValueObject\PhpVersion; use RectorLaravel\Set\LaravelLevelSetList; use Rector\Configuration\RectorConfigBuilder; /** @var RectorConfigBuilder $config */ $config = require __DIR__ . '/vendor/buckhamduffy/coding-standards/rector.php'; $config ->withSets([LaravelLevelSetList::UP_TO_LARAVEL_110]) ->withPhpVersion(PhpVersion::PHP_83) ->withPhpSets(php83: true); return $config;
PHPStan
phpstan.neon
includes: - ./vendor/buckhamduffy/coding-standards/extension.neon
CaptainHook
CaptainHook can be used to install custom made commit hooks
composer require --dev captainhook/hook-installer
cp vendor/buckhamduffy/coding-standards/captainhook.json captainhook.json