{"id":13405228,"url":"https://github.com/PHP-CS-Fixer/PHP-CS-Fixer","last_synced_at":"2025-03-14T09:32:30.238Z","repository":{"id":3302511,"uuid":"4344257","full_name":"PHP-CS-Fixer/PHP-CS-Fixer","owner":"PHP-CS-Fixer","description":"A tool to automatically fix PHP Coding Standards issues","archived":false,"fork":false,"pushed_at":"2024-05-01T00:42:47.000Z","size":32247,"stargazers_count":12560,"open_issues_count":166,"forks_count":1548,"subscribers_count":213,"default_branch":"master","last_synced_at":"2024-05-01T13:43:19.885Z","etag":null,"topics":["code-standards","code-style","hacktoberfest","php","static-analysis"],"latest_commit_sha":null,"homepage":"https://cs.symfony.com","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/PHP-CS-Fixer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"keradus"}},"created_at":"2012-05-16T06:42:23.000Z","updated_at":"2024-06-16T15:00:26.155Z","dependencies_parsed_at":"2023-01-14T11:10:42.937Z","dependency_job_id":"36d94279-b96a-48b2-a01c-72957381e607","html_url":"https://github.com/PHP-CS-Fixer/PHP-CS-Fixer","commit_stats":{"total_commits":4104,"total_committers":359,"mean_commits":11.43175487465181,"dds":0.6535087719298245,"last_synced_commit":"1eb4105d723694852322b090b5bcda4fad3e20ed"},"previous_names":["friendsofphp/php-cs-fixer"],"tags_count":295,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHP-CS-Fixer%2FPHP-CS-Fixer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PHP-CS-Fixer","download_url":"https://codeload.github.com/PHP-CS-Fixer/PHP-CS-Fixer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221449534,"owners_count":16823609,"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","hacktoberfest","php","static-analysis"],"created_at":"2024-07-30T19:01:57.639Z","updated_at":"2025-03-14T09:32:30.126Z","avatar_url":"https://github.com/PHP-CS-Fixer.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://cs.symfony.com\"\u003e\n        \u003cimg src=\"./logo.png\" title=\"PHP CS Fixer\" alt=\"PHP CS Fixer logo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n# PHP Coding Standards Fixer\n\nThe PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards;\nwhether you want to follow PHP coding standards as defined in the PSR-1, PSR-2, etc.,\nor other community driven ones like the Symfony one.\nYou can **also** define your (team's) style through configuration.\n\nIt can modernize your code (like converting the ``pow`` function to the ``**`` operator on PHP 5.6)\nand (micro) optimize it.\n\nIf you are already using a linter to identify coding standards problems in your\ncode, you know that fixing them by hand is tedious, especially on large\nprojects. This tool does not only detect them, but also fixes them for you.\n\n## Supported PHP Versions\n\n* PHP 7.4\n* PHP 8.0\n* PHP 8.1\n* PHP 8.2\n* PHP 8.3\n\n\u003e **Note**\n\u003e Each new PHP version requires a huge effort to support the new syntax.\n\u003e That's why the latest PHP version might not be supported yet. If you need it,\n\u003e please, consider supporting the project in any convenient way, for example\n\u003e with code contribution or reviewing existing PRs. To run PHP CS Fixer on yet\n\u003e unsupported versions \"at your own risk\" - leverage the\n\u003e [PHP_CS_FIXER_IGNORE_ENV](./doc/usage.rst#environment-options).\n\n## Documentation\n\n### Installation\n\nThe recommended way to install PHP CS Fixer is to use [Composer](https://getcomposer.org/download/):\n\n```console\ncomposer require --dev friendsofphp/php-cs-fixer\n## or when facing conflicts in dependencies:\ncomposer require --dev php-cs-fixer/shim\n```\n\nFor more details and other installation methods (also with Docker or behind CI), see\n[installation instructions](./doc/installation.rst).\n\n### Usage\n\nAssuming you installed PHP CS Fixer as instructed above, you can run the\nfollowing command to fix the PHP files in the `src` directory:\n\n```console\n./vendor/bin/php-cs-fixer fix src\n```\n\nSee [usage](./doc/usage.rst), list of [built-in rules](./doc/rules/index.rst), list of [rule sets](./doc/ruleSets/index.rst)\nand [configuration file](./doc/config.rst) documentation for more details.\n\nIf you need to apply code styles that are not supported by the tool, you can\n[create custom rules](./doc/custom_rules.rst).\n\n## Editor Integration\n\nDedicated plugins exist for:\n\n* [NetBeans](https://plugins.netbeans.apache.org/catalogue/?id=36)\n* [PhpStorm](https://www.jetbrains.com/help/phpstorm/using-php-cs-fixer.html)\n* [Sublime Text](https://github.com/benmatselby/sublime-phpcs)\n* [Vim](https://github.com/stephpy/vim-php-cs-fixer)\n* [VS Code](https://github.com/junstyle/vscode-php-cs-fixer)\n\n## Community\n\nThe PHP CS Fixer is maintained on GitHub at \u003chttps://github.com/PHP-CS-Fixer/PHP-CS-Fixer\u003e.\nBug reports and ideas about new features are welcome there.\n\nYou can reach us in the [GitHub Discussions](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/discussions/) regarding the\nproject, configuration, possible improvements, ideas and questions. Please visit us there!\n\n## Contribute\n\nThe tool comes with quite a few built-in fixers, but everyone is more than\nwelcome to [contribute](CONTRIBUTING.md) more of them.\n","funding_links":["https://github.com/sponsors/keradus"],"categories":["PHP","Table of Contents","网络服务","Testing","Developer Tools","Development"],"sub_categories":["Code Quality","网络服务_其他","Easy coding standard","Quality Check"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPHP-CS-Fixer%2FPHP-CS-Fixer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPHP-CS-Fixer%2FPHP-CS-Fixer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPHP-CS-Fixer%2FPHP-CS-Fixer/lists"}