{"id":20646565,"url":"https://github.com/tienne/php_codesniffer","last_synced_at":"2025-07-16T10:33:44.765Z","repository":{"id":57069551,"uuid":"88822238","full_name":"tienne/PHP_CodeSniffer","owner":"tienne","description":null,"archived":false,"fork":false,"pushed_at":"2017-04-20T05:03:40.000Z","size":715,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T09:45:15.446Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tienne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-20T04:54:11.000Z","updated_at":"2017-04-20T04:55:14.000Z","dependencies_parsed_at":"2022-08-24T14:54:17.783Z","dependency_job_id":null,"html_url":"https://github.com/tienne/PHP_CodeSniffer","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienne%2FPHP_CodeSniffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienne%2FPHP_CodeSniffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienne%2FPHP_CodeSniffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tienne%2FPHP_CodeSniffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tienne","download_url":"https://codeload.github.com/tienne/PHP_CodeSniffer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242721881,"owners_count":20174805,"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-11-16T16:26:18.021Z","updated_at":"2025-03-09T16:58:58.498Z","avatar_url":"https://github.com/tienne.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"About\n-----\n\nPHP\\_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations. PHP\\_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.\n\n[![Build Status](https://travis-ci.org/squizlabs/PHP_CodeSniffer.svg?branch=phpcs-fixer)](https://travis-ci.org/squizlabs/PHP_CodeSniffer) [![Code consistency](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer/grade.svg)](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer)\n\n[![Join the chat at https://gitter.im/squizlabs/PHP_CodeSniffer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/squizlabs/PHP_CodeSniffer?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nRequirements\n------------\n\nPHP\\_CodeSniffer requires PHP version 5.1.2 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options) for a list of these requirements.\n\nThe SVN pre-commit hook requires PHP version 5.2.4 or greater due to its use of the vertical whitespace character.\n\nInstallation\n------------\n\nThe easiest way to get started with PHP\\_CodeSniffer is to download the [Phar](http://php.net/manual/en/intro.phar.php) files for each of the commands:\n\n    curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar\n    php phpcs.phar -h\n\n    curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar\n    php phpcbf.phar -h\n\nIf you use PEAR, you can install PHP\\_CodeSniffer using the PEAR installer. This will make the `phpcs` and `phpcbf` commands immediately available for use. To install PHP\\_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command:\n\n    pear install PHP_CodeSniffer\n\nIf you prefer using [Composer](http://getcomposer.org/) you can easily install PHP_CodeSniffer system-wide with the following command:\n\n    composer global require \"squizlabs/php_codesniffer=*\"\n\nMake sure you have the composer bin dir in your PATH. The default value is `~/.composer/vendor/bin/`, but you can check the value that you need to use by running `composer global config bin-dir --absolute`.\n\nOr alternatively, include a dependency for `squizlabs/php_codesniffer` in your `composer.json` file. For example:\n\n```json\n{\n    \"require-dev\": {\n        \"squizlabs/php_codesniffer\": \"2.*\"\n    }\n}\n```\n\nYou will then be able to run PHP_CodeSniffer from the vendor bin directory:\n\n    ./vendor/bin/phpcs -h\n    ./vendor/bin/phpcbf -h\n\nYou can also download the PHP\\_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git clone:\n\n    git clone https://github.com/squizlabs/PHP_CodeSniffer.git\n    cd PHP_CodeSniffer\n    php scripts/phpcs -h\n    php scripts/phpcbf -h\n\nDocumentation\n-------------\n\nThe documentation for PHP\\_CodeSniffer is available on the [Github wiki](https://github.com/squizlabs/PHP_CodeSniffer/wiki).\n\nInformation about upcoming features and releases is available on the [Squiz Labs blog](http://www.squizlabs.com/php-codesniffer).\n\nIssues\n------\n\nBug reports and feature requests can be submitted on the [Github Issue Tracker](https://github.com/squizlabs/PHP_CodeSniffer/issues) or the [PEAR bug tracker](http://pear.php.net/package/PHP_CodeSniffer/bugs).\n\nContributing\n-------------\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftienne%2Fphp_codesniffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftienne%2Fphp_codesniffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftienne%2Fphp_codesniffer/lists"}