{"id":17472363,"url":"https://github.com/jackiedo/artisan-php-cs-fixer","last_synced_at":"2025-04-22T10:43:35.138Z","repository":{"id":56995455,"uuid":"95129494","full_name":"JackieDo/Artisan-PHP-CS-Fixer","owner":"JackieDo","description":"A PHP-CS-Fixer bridge for use via Artisan CLI on Laravel","archived":false,"fork":false,"pushed_at":"2023-02-19T23:51:37.000Z","size":50,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T10:43:30.369Z","etag":null,"topics":["artisan","coding-standards","laravel","php-cs-fixer"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JackieDo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-06-22T15:24:25.000Z","updated_at":"2024-07-09T09:50:09.000Z","dependencies_parsed_at":"2025-04-20T06:15:28.767Z","dependency_job_id":null,"html_url":"https://github.com/JackieDo/Artisan-PHP-CS-Fixer","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackieDo%2FArtisan-PHP-CS-Fixer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackieDo%2FArtisan-PHP-CS-Fixer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackieDo%2FArtisan-PHP-CS-Fixer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackieDo%2FArtisan-PHP-CS-Fixer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackieDo","download_url":"https://codeload.github.com/JackieDo/Artisan-PHP-CS-Fixer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250222405,"owners_count":21394862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan","coding-standards","laravel","php-cs-fixer"],"created_at":"2024-10-18T17:08:49.912Z","updated_at":"2025-04-22T10:43:35.088Z","avatar_url":"https://github.com/JackieDo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Artisan PHP CS Fixer\n[![Total Downloads](https://poser.pugx.org/jackiedo/artisan-php-cs-fixer/downloads)](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)\n[![Latest Stable Version](https://poser.pugx.org/jackiedo/artisan-php-cs-fixer/v/stable)](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)\n[![Latest Unstable Version](https://poser.pugx.org/jackiedo/artisan-php-cs-fixer/v/unstable)](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)\n[![License](https://poser.pugx.org/jackiedo/artisan-php-cs-fixer/license)](https://packagist.org/packages/jackiedo/artisan-php-cs-fixer)\n\n\u003e 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.\n\n\u003e 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.\n\nThese 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.\n\n# Features of this package\n* Use PHP-CS-Fixer differently for each Laravel project.\n* Run PHP-CS-Fixer command via Laravel Artisan CLI.\n* Easily export the fixer configuration to set up or share with team.\n\n# Overview\nLook at one of the following topics to learn more about Artisan PHP CS Fixer\n\n- [Artisan PHP CS Fixer](#artisan-php-cs-fixer)\n- [Features of this package](#features-of-this-package)\n- [Overview](#overview)\n  - [Versions and compatibility](#versions-and-compatibility)\n  - [Note for the version 3.x](#note-for-the-version-3x)\n  - [Installation](#installation)\n  - [Usage](#usage)\n      - [Get version](#get-version)\n      - [Fix code](#fix-code)\n      - [Describe rule or rule set](#describe-rule-or-rule-set)\n  - [Configuration](#configuration)\n  - [Exclusion of the cache file](#exclusion-of-the-cache-file)\n  - [License](#license)\n  - [PHP CS Fixer official documentation](#php-cs-fixer-official-documentation)\n  - [Thanks for use](#thanks-for-use)\n\n## Versions and compatibility\nArtisan PHP CS Fixer don't support Laravel 4.x. Currently, this package have following branchs compatible with Laravel 5.x and later:\n\n| Branch                                                              | Laravel version  |\n| ------------------------------------------------------------------- | ---------------- |\n| [1.x](https://github.com/JackieDo/Artisan-PHP-CS-Fixer/tree/1.x)    | 5.0 - 5.2        |\n| [2.x](https://github.com/JackieDo/Artisan-PHP-CS-Fixer/tree/2.x)    | 5.3 - 7.x        |\n| [3.x](https://github.com/JackieDo/Artisan-PHP-CS-Fixer/tree/master) | 8.x and later    |\n\n\u003e **Note:** This documentation is used for branch 3.x\n\n## Note for the version 3.x\nIf you have used this package before, please see [here](UPGRADING.md#from-v2x-to-v3x) for the change in v3.x\n\n## Installation\nYou 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):\n\n```shell\n$ composer require jackiedo/artisan-php-cs-fixer\n```\n\n## Usage\n\n#### Get version\nDisplay PHP-CS-Fixer version installed.\n\nSyntax:\n```shell\n$ php artisan php-cs-fixer:version\n```\n\n#### Fix code\nFix your code with PHP Coding Standards.\n\nSyntax:\n```shell\n$ php artisan php-cs-fixer:fix [options] [path/to/dir/or/file]\n```\n\nExample:\n```\n// Only shows which all files in your project would have been modified, leaving your files unchanged.\n$ php artisan php-cs-fixer:fix --dry-run\n\n// Really fixes all files in your project.\n$ php artisan php-cs-fixer:fix\n\n// Only fixes all files in the `app` directory\n$ php artisan php-cs-fixer:fix app\n\n// Only fixes all files in the `app` directory with specific configuration file\n$ php artisan php-cs-fixer:fix --config=\"path/to/fixer-config/file\" app\n```\n\n#### Describe rule or rule set\nDisplay description/usage of rule or rule set.\n\nSyntax:\n```shell\n$ php artisan php-cs-fixer:describe name/of/rule/or/rule-set\n```\n\nExampple 1:\n```shell\n$ php artisan php-cs-fixer:describe @Symfony\n```\n\nExampple 2:\n```shell\n$ php artisan php-cs-fixer:describe array_syntax\n```\n\n## Configuration\nTo change the configuration of the fixer with your own purpose, you need publish the configuration file with the artisan `vendor:publish` as follow:\n\n```\n$ php artisan vendor:publish --provider=\"Jackiedo\\ArtisanPhpCsFixer\\ArtisanPhpCsFixerServiceProvider\"\n```\n\nThis 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.\n\n## Exclusion of the cache file\nWhenever 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:\n\n```\n.php-cs-fixer.cache\n```\n\n## License\n[MIT](LICENSE) © Jackie Do\n\n## PHP CS Fixer official documentation\nFor more documentation about PHP CS Fixer, you can visit [here](https://github.com/FriendsOfPHP/PHP-CS-Fixer).\n\n## Thanks for use\nHopefully, this package is useful to you.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackiedo%2Fartisan-php-cs-fixer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackiedo%2Fartisan-php-cs-fixer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackiedo%2Fartisan-php-cs-fixer/lists"}