{"id":13609236,"url":"https://github.com/eduarguz/shift-php-cs","last_synced_at":"2025-12-28T19:29:22.644Z","repository":{"id":45578495,"uuid":"261038342","full_name":"eduarguz/shift-php-cs","owner":"eduarguz","description":"Laravel Shift recommended style config","archived":false,"fork":false,"pushed_at":"2023-01-09T13:43:34.000Z","size":11,"stargazers_count":11,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T02:01:48.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eduarguz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-03T23:11:07.000Z","updated_at":"2022-01-22T02:41:38.000Z","dependencies_parsed_at":"2023-02-08T12:00:16.211Z","dependency_job_id":null,"html_url":"https://github.com/eduarguz/shift-php-cs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduarguz%2Fshift-php-cs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduarguz%2Fshift-php-cs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduarguz%2Fshift-php-cs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eduarguz%2Fshift-php-cs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eduarguz","download_url":"https://codeload.github.com/eduarguz/shift-php-cs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223538957,"owners_count":17162020,"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":[],"created_at":"2024-08-01T19:01:33.489Z","updated_at":"2025-12-28T19:29:22.581Z","avatar_url":"https://github.com/eduarguz.png","language":"PHP","readme":"#  PHP CS Fixer - Laravel Coding Style Ruleset\n\nThis package allows you to use the set of rules for [PHP CS Fixer](https://github.com/FriendsOfPhp/PHP-CS-Fixer) created and recommended by [Laravel Shift](https://laravelshift.com/).\n\nYou can find the **original and official** source of the ruleset in [this gist](https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200).\n\n## Installation\nYou can install the ruleset via composer using the following command:\n\n```sh\ncomposer require --dev eduarguz/shift-php-cs\n```\n\nThis package will also require the `^3.0` version of `friendsofphp/php-cs-fixer` package .\n\n## Usage\nThis package only gives you easy access to the recommended ruleset. The common and usual PHP-CS-Fixer setup\nis still required:\n\nIn case you don't have one, create your `.php-cs-fixer.php` file.\n\n```sh\ntouch .php-cs-fixer.php\n```\n\nPut your `Finder` config inside. This will tell PHP-CS-Fixer where to run.\n\nUsually, for a Laravel Project this is the config:\n\n```php\n\u003c?php\n\nuse PhpCsFixer\\Finder;\n\n$project_path = getcwd();\n$finder = Finder::create()\n    -\u003ein([\n        $project_path . '/app',\n        $project_path . '/config',\n        $project_path . '/database',\n        $project_path . '/resources',\n        $project_path . '/routes',\n        $project_path . '/tests',\n    ])\n    -\u003ename('*.php')\n    -\u003enotName('*.blade.php')\n    -\u003eignoreDotFiles(true)\n    -\u003eignoreVCS(true);\n\nreturn \\ShiftCS\\styles($finder);\n\n```\n\nRun your fixer.\n\n```sh\n./vendor/bin/php-cs-fixer fix\n```\n\nRun on CI\n\n```sh\n./vendor/bin/php-cs-fixer fix --dry-run\n```\n\n## Upgrade from 1.x to 3.x version of this package (to PHP-CS-Fixer 3.x)\n\n```sh\ncomposer require --dev eduarguz/shift-php-cs\n```\n\nRename any of your existing files:\n\n`.php_cs` -\u003e `.php-cs-fixer.php`\n\n`.php_cs.dist` -\u003e `.php-cs-fixer.dist.php`\n\n`.php_cs.cache` -\u003e `.php-cs-fixer.cache`\n\n## Resources\n\n- Sharing PHP-CS-Fixer rules across projects and teams. [Laravel News Article](https://laravel-news.com/sharing-php-cs-fixer-rules-across-projects-and-teams)\n- Laravel Shift Recommended Coding Ruleset. [Gist](https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200) - [Shift](https://laravelshift.com/)\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduarguz%2Fshift-php-cs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feduarguz%2Fshift-php-cs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feduarguz%2Fshift-php-cs/lists"}