Search by

mnib-dev / coding-standard

mynameisbogdan

Personal coding standards heavily based on Doctrine Coding Standard.

Package info

github.com/mynameisbogdan/coding-standard

Type:phpcodesniffer-standard

pkg:composer/mnib-dev/coding-standard

Statistics

Installs: 3 117

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.3 2026-10-04 12:49 UTC

This package is auto-updated.

Last update: 2026-10-04 12:50:58 UTC


README

Create a file named .php_cs.dist with the contents:

<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
    ->in(__DIR__ . '/src')
    ->ignoreDotFiles(true)
    ->ignoreVCS(true)
    ->files()
    ->name('*.php')
;

return (new PhpCsFixer\Config())
    ->setFinder($finder)
    ->registerCustomRuleSets([
        new MNIB\CsFixer\MNIBStandardSet(),
    ])
    ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
    ->setRiskyAllowed(true)
    ->setRules([
        '@MNIB/Standard' => true,

        'declare_strict_types' => true,
        'strict_comparison' => true,
        'strict_param' => true,
        'string_line_ending' => true,
    ])
;