PHPackages                             jackiedo/artisan-php-cs-fixer - 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. [CLI &amp; Console](/categories/cli)
4. /
5. jackiedo/artisan-php-cs-fixer

ActiveLibrary[CLI &amp; Console](/categories/cli)

jackiedo/artisan-php-cs-fixer
=============================

A PHP-CS-Fixer bridge for use via Artisan CLI on Laravel.

v3.0.1(4y ago)11325MITPHPPHP &gt;=7.3.0

Since Jun 23Pushed 3y ago2 watchersCompare

[ Source](https://github.com/JackieDo/Artisan-PHP-CS-Fixer)[ Packagist](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)[ RSS](/packages/jackiedo-artisan-php-cs-fixer/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (0)

Artisan PHP CS Fixer
====================

[](#artisan-php-cs-fixer)

[![Total Downloads](https://camo.githubusercontent.com/189e14ef05b462b5a3401b2d883cc3f71fb45450db01d42fb8e690ee5e1b411f/68747470733a2f2f706f7365722e707567782e6f72672f6a61636b6965646f2f6172746973616e2d7068702d63732d66697865722f646f776e6c6f616473)](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)[![Latest Stable Version](https://camo.githubusercontent.com/b512188cfda80a1c484be4917bd8bbb82bfa4e0d09955738217da1015cb28ba2/68747470733a2f2f706f7365722e707567782e6f72672f6a61636b6965646f2f6172746973616e2d7068702d63732d66697865722f762f737461626c65)](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)[![Latest Unstable Version](https://camo.githubusercontent.com/7514a432c0aaa4ee91359e21809d2f5cd8e117b086c4c061f1e8a440aec9b5b8/68747470733a2f2f706f7365722e707567782e6f72672f6a61636b6965646f2f6172746973616e2d7068702d63732d66697865722f762f756e737461626c65)](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)[![License](https://camo.githubusercontent.com/e2518dd3cba3b297aaf6428152d298b1cc8aeea74d30a84649c67738734a79b0/68747470733a2f2f706f7365722e707567782e6f72672f6a61636b6965646f2f6172746973616e2d7068702d63732d66697865722f6c6963656e7365)](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)

> The PHP Coding Standards Fixer tool fixes most issues in your code when you want to follow the PHP coding standards as defined in the PSR-1 and PSR-2 documents and many more.

> If you are already using a linter to identify coding standards problems in your code, you know that fixing them by hand is tedious, especially on large projects. This tool does not only detect them, but also fixes them for you.

These are introductions from authors who created PHP-CS-Fixer and this package is a [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) bridge for use via Artisan CLI on Laravel. From now on, you can easily use PHP-CS-Fixer differently for each Laravel project with your team instead of installing a global fixer.

Features of this package
========================

[](#features-of-this-package)

- Use PHP-CS-Fixer differently for each Laravel project.
- Run PHP-CS-Fixer command via Laravel Artisan CLI.
- Easily export the fixer configuration to set up or share with team.

Overview
========

[](#overview)

Look at one of the following topics to learn more about Artisan PHP CS Fixer

- [Artisan PHP CS Fixer](#artisan-php-cs-fixer)
- [Features of this package](#features-of-this-package)
- [Overview](#overview)
    - [Versions and compatibility](#versions-and-compatibility)
    - [Note for the version 3.x](#note-for-the-version-3x)
    - [Installation](#installation)
    - [Usage](#usage)
        - [Get version](#get-version)
        - [Fix code](#fix-code)
        - [Describe rule or rule set](#describe-rule-or-rule-set)
    - [Configuration](#configuration)
    - [Exclusion of the cache file](#exclusion-of-the-cache-file)
    - [License](#license)
    - [PHP CS Fixer official documentation](#php-cs-fixer-official-documentation)
    - [Thanks for use](#thanks-for-use)

Versions and compatibility
--------------------------

[](#versions-and-compatibility)

Artisan PHP CS Fixer don't support Laravel 4.x. Currently, this package have following branchs compatible with Laravel 5.x and later:

BranchLaravel version[1.x](https://github.com/JackieDo/Artisan-PHP-CS-Fixer/tree/1.x)5.0 - 5.2[2.x](https://github.com/JackieDo/Artisan-PHP-CS-Fixer/tree/2.x)5.3 - 7.x[3.x](https://github.com/JackieDo/Artisan-PHP-CS-Fixer/tree/master)8.x and later> **Note:** This documentation is used for branch 3.x

Note for the version 3.x
------------------------

[](#note-for-the-version-3x)

If you have used this package before, please see [here](UPGRADING.md#from-v2x-to-v3x) for the change in v3.x

Installation
------------

[](#installation)

You can install this package through [Composer](https://getcomposer.org). At the root of your Laravel application directory, run the following command (in any terminal client):

```
$ composer require jackiedo/artisan-php-cs-fixer
```

Usage
-----

[](#usage)

#### Get version

[](#get-version)

Display PHP-CS-Fixer version installed.

Syntax:

```
$ php artisan php-cs-fixer:version
```

#### Fix code

[](#fix-code)

Fix your code with PHP Coding Standards.

Syntax:

```
$ php artisan php-cs-fixer:fix [options] [path/to/dir/or/file]
```

Example:

```
// Only shows which all files in your project would have been modified, leaving your files unchanged.
$ php artisan php-cs-fixer:fix --dry-run

// Really fixes all files in your project.
$ php artisan php-cs-fixer:fix

// Only fixes all files in the `app` directory
$ php artisan php-cs-fixer:fix app

// Only fixes all files in the `app` directory with specific configuration file
$ php artisan php-cs-fixer:fix --config="path/to/fixer-config/file" app

```

#### Describe rule or rule set

[](#describe-rule-or-rule-set)

Display description/usage of rule or rule set.

Syntax:

```
$ php artisan php-cs-fixer:describe name/of/rule/or/rule-set
```

Exampple 1:

```
$ php artisan php-cs-fixer:describe @Symfony
```

Exampple 2:

```
$ php artisan php-cs-fixer:describe array_syntax
```

Configuration
-------------

[](#configuration)

To change the configuration of the fixer with your own purpose, you need publish the configuration file with the artisan `vendor:publish` as follow:

```
$ php artisan vendor:publish --provider="Jackiedo\ArtisanPhpCsFixer\ArtisanPhpCsFixerServiceProvider"

```

This will create one file named `.php-cs-fixer.php` in the root directory of your project. This file is returned an instance of `PhpCsFixer\ConfigInterface` which lets you configure the rules, the files and directories that need to be analyzed. From now and then, you can share this file with all of your developing team members. The rest is you have to think of a way to always sync this file for your team.

Exclusion of the cache file
---------------------------

[](#exclusion-of-the-cache-file)

Whenever you run the artisan `php-cs-fixer:fix` command, one file with named `.php-cs-fixer.cache` will be created at the root directory of your project. You can exclude this file by append following line into `.gitignore` file:

```
.php-cs-fixer.cache

```

License
-------

[](#license)

[MIT](LICENSE) © Jackie Do

PHP CS Fixer official documentation
-----------------------------------

[](#php-cs-fixer-official-documentation)

For more documentation about PHP CS Fixer, you can visit [here](https://github.com/FriendsOfPHP/PHP-CS-Fixer).

Thanks for use
--------------

[](#thanks-for-use)

Hopefully, this package is useful to you.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~108 days

Recently: every ~3 days

Total

17

Last Release

1568d ago

Major Versions

v1.0.1 → v2.0.02017-06-23

v1.0.2 → v2.0.12017-06-23

v1.0.3 → v2.0.22017-06-24

v1.0.4 → v2.0.42020-06-15

v2.0.6 → v3.0.02022-03-04

PHP version history (4 changes)v1.0.0PHP &gt;=5.4.0

v2.0.0PHP &gt;=5.6.4

v2.0.5PHP &gt;=7.1.3

v3.0.0PHP &gt;=7.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e275bda3c66d969fc06951725fb9baa82b3b0c7eba7e9c4fcf0cf9101c2041c2?d=identicon)[JackieDo](/maintainers/JackieDo)

---

Top Contributors

[![JackieDo](https://avatars.githubusercontent.com/u/9862115?v=4)](https://github.com/JackieDo "JackieDo (48 commits)")

---

Tags

artisancoding-standardslaravelphp-cs-fixerphpstandardslaravelfixerartisancodingdevelopphp-cs-fixer

### Embed Badge

![Health badge](/badges/jackiedo-artisan-php-cs-fixer/health.svg)

```
[![Health](https://phpackages.com/badges/jackiedo-artisan-php-cs-fixer/health.svg)](https://phpackages.com/packages/jackiedo-artisan-php-cs-fixer)
```

###  Alternatives

[stechstudio/laravel-php-cs-fixer

Easily format your Laravel Code with this Configuration file and accompanying artisan command.

146722.8k2](/packages/stechstudio-laravel-php-cs-fixer)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815424.6k52](/packages/nunomaduro-laravel-console-menu)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2592.3M13](/packages/nunomaduro-laravel-console-task)[nunomaduro/laravel-console-summary

A Beautiful Laravel Console Summary for your Laravel/Laravel Zero commands.

672.2M4](/packages/nunomaduro-laravel-console-summary)[nunomaduro/laravel-console-dusk

Laravel Console Dusk allows the usage of Laravel Dusk in Laravel/Laravel Zero artisan commands.

16357.3k8](/packages/nunomaduro-laravel-console-dusk)[rahul900day/laravel-console-spinner

Laravel Console Spinner is a spinner output for Laravel command line.

76128.8k1](/packages/rahul900day-laravel-console-spinner)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
