mnib-dev/coding-standard

Personal coding standards heavily based on Doctrine Coding Standard.

Installs: 3 098

Dependents: 3

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:phpcodesniffer-standard

v0.1.5 2023-08-12 12:54 UTC

This package is auto-updated.

Last update: 2024-06-12 15:03:39 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 MNIB\CsFixer\Config())
    ->setFinder($finder)
    ->setRiskyAllowed(true)
    ->addRules([
        'declare_strict_types' => true,
        'strict_comparison' => true,
        'strict_param' => true,
        'string_line_ending' => true,
    ])
;