mobizel / coding-standard
Battle-tested coding standard configuration used at Mobizel.
Installs: 13 496
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
- symplify/easy-coding-standard: ^10.0
This package is auto-updated.
Last update: 2024-10-30 01:33:26 UTC
README
Coding Standard
🥇 Battle-tested coding standard configuration used at Mobizel.
Installation & usage
-
Install this package:
$ composer require --dev mobizel/coding-standard
-
Import the configuration file in your
ecs.php
:$ecsConfig->import('vendor/mobizel/coding-standard/ecs.php');
Example config (ecs.php)
<?php use PhpCsFixer\Fixer\Comment\HeaderCommentFixer; use Symplify\EasyCodingStandard\Config\ECSConfig; return static function (ECSConfig $ecsConfig): void { $ecsConfig->import('vendor/mobizel/coding-standard/ecs.php'); $header = <<<EOM This file is part of <The Project>. (c) Mobizel For the full copyright and license information, please view the LICENSE file that was distributed with this source code. EOM; $services = $ecsConfig->services(); $services ->set(HeaderCommentFixer::class) ->call('configure', [[ 'header' => $header, 'location' => 'after_open', ]]) ; };