Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Slamdunk/php-cs-fixer-extensions
PHP-CS-Fixer extensions and configurations
https://github.com/Slamdunk/php-cs-fixer-extensions
coding-standards php php-cs-fixer
Last synced: 16 days ago
JSON representation
PHP-CS-Fixer extensions and configurations
- Host: GitHub
- URL: https://github.com/Slamdunk/php-cs-fixer-extensions
- Owner: Slamdunk
- License: mit
- Created: 2017-04-03T11:50:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-06T14:10:56.000Z (16 days ago)
- Last Synced: 2024-06-06T15:53:02.569Z (16 days ago)
- Topics: coding-standards, php, php-cs-fixer
- Language: PHP
- Size: 175 KB
- Stars: 68
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-starred - php-cs-fixer-extensions - CS-Fixer extensions and configurations | Slamdunk | 68 | (PHP)
README
# Slam PHP-CS-Fixer extensions
[![Latest Stable Version](https://img.shields.io/packagist/v/slam/php-cs-fixer-extensions.svg)](https://packagist.org/packages/slam/php-cs-fixer-extensions)
[![Downloads](https://img.shields.io/packagist/dt/slam/php-cs-fixer-extensions.svg)](https://packagist.org/packages/slam/php-cs-fixer-extensions)
[![Integrate](https://github.com/Slamdunk/php-cs-fixer-extensions/workflows/CI/badge.svg?branch=master)](https://github.com/Slamdunk/php-cs-fixer-extensions/actions)[PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) extensions and configurations
## Installation
Execute:
`composer require --dev slam/php-cs-fixer-extensions`
## Usage
In your `.php_cs` file:
```php
setRiskyAllowed(true);$config->registerCustomFixers([
new SlamCsFixer\FinalAbstractPublicFixer(),
new SlamCsFixer\FinalInternalClassFixer(),
new SlamCsFixer\FunctionReferenceSpaceFixer(),
new SlamCsFixer\InlineCommentSpacerFixer(),
new SlamCsFixer\PhpFileOnlyProxyFixer(new PhpCsFixer\Fixer\Basic\BracesFixer()),
new SlamCsFixer\Utf8Fixer(),
]);$this->setRules([
'Slam/final_abstract_public' => true,
'Slam/final_internal_class' => true,
'Slam/function_reference_space' => true,
'Slam/inline_comment_spacer' => true,
'Slam/php_only_braces' => true,
'Slam/utf8' => true,
]);$config->getFinder()
->in(__DIR__ . '/app')
->in(__DIR__ . '/tests')
->name('*.phtml')
;return $config;
```