buckhamduffy/coding-standards

There is no license information available for the latest version (v6.1.6) of this package.

v6.1.6 2024-09-04 14:19 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