Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
/ php-code-style Public archive

The Eloquent code style definition for PHP.

License

Notifications You must be signed in to change notification settings

eloquent/php-code-style

Repository files navigation

No longer maintained

This package is no longer maintained. See this statement for more info.

Eloquent PHP code style definition

Installation

Install dependencies:

composer require --dev friendsofphp/php-cs-fixer eloquent/code-style

Add a .php-cs-fixer.php file:

<?php return Eloquent\CodeStyle\Config::create(__DIR__);

To customize excluded paths, access the existing finder object:

<?php

$config = Eloquent\CodeStyle\Config::create(__DIR__);
$config->getFinder()->exclude([
    'artifacts',
    'test/fixture',
]);

return $config;

Usage

vendor/bin/php-cs-fixer fix