PHPackages                             lst/typo3-phpcsfixer-rules - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. lst/typo3-phpcsfixer-rules

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

lst/typo3-phpcsfixer-rules
==========================

The PHP Coding Standards Fixer rules used by the TYPO3 CMS

0.3.0(2y ago)0406GPL-2.0-or-laterPHPPHP ^7.4 || ^8.0

Since Mar 28Pushed 1y ago2 watchersCompare

[ Source](https://github.com/lst-ag/typo3-phpcsfixer-rules)[ Packagist](https://packagist.org/packages/lst/typo3-phpcsfixer-rules)[ RSS](/packages/lst-typo3-phpcsfixer-rules/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

TYPO3 PHP-CS-Fixer Rules
========================

[](#typo3-php-cs-fixer-rules)

This package provides the PHP Coding Standards Fixer [rules](https://git.typo3.org/typo3/typo3/-/blob/main/Build/php-cs-fixer/config.php) used by the [TYPO3 CMS](https://www.typo3.org) in a static method. Additionally, it provides the custom rules for LST TYPO3 projects in a static method. That's it.

This package has no dependencies, you need to install PHP-CS-Fixer on your own.

Usage
-----

[](#usage)

Install the package via composer:

```
composer require lst/typo3-phpcsfixer-rules --dev
```

You can access the rules in your PHP-CS-Fixer configuration by calling `\LST\TYPO3PhpCsFixerRules\PhpCsFixer::getRules()`.

To access the official rules only, use `\LST\TYPO3PhpCsFixerRules\PhpCsFixer::getOfficialRules()`.

### Example config

[](#example-config)

An example `.php-cs-fixer.php` file to fix code in the folder `packages`:

```
