{"id":28560076,"url":"https://github.com/capsulescodes/php-cs-fixer-custom-fixers","last_synced_at":"2026-04-02T21:44:37.324Z","repository":{"id":244927807,"uuid":"736065656","full_name":"capsulescodes/php-cs-fixer-custom-fixers","owner":"capsulescodes","description":"A set of custom fixers for PHP CS Fixer","archived":false,"fork":false,"pushed_at":"2025-06-01T22:40:46.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T08:36:27.891Z","etag":null,"topics":["code-standards","code-style","php","php-cs-fixer","static-analysis"],"latest_commit_sha":null,"homepage":"","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/capsulescodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-12-26T22:22:49.000Z","updated_at":"2025-06-01T22:40:18.000Z","dependencies_parsed_at":"2024-06-22T02:55:10.684Z","dependency_job_id":"9c4e9c0e-a298-4092-bee1-970d302bccd0","html_url":"https://github.com/capsulescodes/php-cs-fixer-custom-fixers","commit_stats":null,"previous_names":["capsulescodes/php-cs-fixer-custom-fixers"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fphp-cs-fixer-custom-fixers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fphp-cs-fixer-custom-fixers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fphp-cs-fixer-custom-fixers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fphp-cs-fixer-custom-fixers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capsulescodes","download_url":"https://codeload.github.com/capsulescodes/php-cs-fixer-custom-fixers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capsulescodes%2Fphp-cs-fixer-custom-fixers/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259043766,"owners_count":22797162,"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":["code-standards","code-style","php","php-cs-fixer","static-analysis"],"created_at":"2025-06-10T09:07:18.784Z","updated_at":"2026-01-01T23:29:32.380Z","avatar_url":"https://github.com/capsulescodes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About\n\nA set of custom fixers for [ PHP CS Fixer ](https://github.com/FriendsOfPHP/PHP-CS-Fixer).\n\n\u003e [!NOTE]\n\u003e This is in active development. New fixers will be introduced gradually.\n\n\u003cbr\u003e\n\n## Fixers\n\n\u003cbr\u003e\n\n### MethodChainingIndentationFixer\n\nIndents each chained methods.\n\n```diff\n- Foo::bar()-\u003ebaz()-\u003equx()-\u003equux()-\u003ecorge();\n\n+ Foo::bar()\n+     -\u003ebaz()\n+     -\u003equx()\n+     -\u003equux()\n+     -\u003ecorge();\n```\n\u003e [!TIP]\n\u003e `single-line` : Set chains on single line `{true|false}`\\\n\u003e `multi-line` : Set chains on next line if `{number}` chains\n\n\u003cbr\u003e\n\n### MultipleLinesAfterImportsFixer\n\nAdds a given number of lines after imports.\n\n```diff\n- use Baz;\n- class Qux {}\n\n+ use Baz;\n+\n+\n+ class Qux {}\n```\n\u003e [!TIP]\n\u003e `lines` : Set `{number}` blank lines after the use statements block\n\n\u003cbr\u003e\n\n### SpacesInsideSquareBracesFixer :\n\nAdds spaces inside squared braces.\n\n```diff\n- $foo = [\"bar\", \"baz\", \"qux\"];\n\n+ $foo = [ \"bar\", \"baz\", \"qux\" ];\n```\n\u003e [!TIP]\n\u003e `space` : Set space inside parentheses `{single|none}`.\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n## Installation\n\n1. Install dependency\n\n```bash\ncomposer require --dev capsulescodes/php-cs-fixer-custom-fixers\n```\n\n\u003cbr\u003e\n\n## Usage\n\n\n- Using `.php-cs-fixer.php` config file by [ PHP CS Fixer ](https://github.com/junstyle/vscode-php-cs-fixer)\n\n\n\n```php\n\u003c?php\n\nuse PhpCsFixer\\Config;\n\n\nreturn ( new PhpCsFixer\\Config() )\n    ...\n    -\u003eregisterCustomFixers( [\n\n        ...\n        new \\CapsulesCodes\\PhpCsFixerCustomFixers\\Fixers()\n        ...\n\n        or\n\n        ...\n        new \\CapsulesCodes\\PhpCsFixerCustomFixers\\MethodChainingIndentationFixer(),\n        new \\CapsulesCodes\\PhpCsFixerCustomFixers\\MultipleLinesAfterImportsFixer(),\n        new \\CapsulesCodes\\PhpCsFixerCustomFixers\\SpacesInsideSquareBracesFixer()\n        ...\n\n    ] )\n    -\u003esetRules( [\n\n        ...\n        \"CapsulesCodes/method_chaining_indentation\" : { \"multi-line\" : 4 },\n        \"CapsulesCodes/multiple_lines_after_imports\" : { \"lines\" : 2 },\n        \"CapsulesCodes/spaces_inside_square_braces\" : { \"space\" : \"single\" }\n        ...\n\n   ] )\n;\n```\n\n\u003cbr\u003e\n\n---\n\n\u003cbr\u003e\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\nPlease make sure to update tests as appropriate.\n\n## Credits\n\n[Capsules Codes](https://github.com/capsulescodes)\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsulescodes%2Fphp-cs-fixer-custom-fixers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapsulescodes%2Fphp-cs-fixer-custom-fixers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapsulescodes%2Fphp-cs-fixer-custom-fixers/lists"}