{"id":13475775,"url":"https://github.com/cakephp/cakephp-codesniffer","last_synced_at":"2025-06-25T23:07:29.154Z","repository":{"id":2644818,"uuid":"3634443","full_name":"cakephp/cakephp-codesniffer","owner":"cakephp","description":"CakePHP Code Sniffer","archived":false,"fork":false,"pushed_at":"2025-05-12T17:22:46.000Z","size":922,"stargazers_count":236,"open_issues_count":3,"forks_count":83,"subscribers_count":33,"default_branch":"5.x","last_synced_at":"2025-05-12T18:23:13.251Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cakephp.org","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/cakephp.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}},"created_at":"2012-03-06T04:10:38.000Z","updated_at":"2025-05-12T17:04:12.000Z","dependencies_parsed_at":"2024-05-02T14:12:07.385Z","dependency_job_id":"a12d972f-1908-46bc-b7f2-b64c3421de0f","html_url":"https://github.com/cakephp/cakephp-codesniffer","commit_stats":{"total_commits":560,"total_committers":56,"mean_commits":10.0,"dds":0.8196428571428571,"last_synced_commit":"24fa2321d54e5251ac2f59dd92dd2066f0b0bdae"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"purl":"pkg:github/cakephp/cakephp-codesniffer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakephp%2Fcakephp-codesniffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakephp%2Fcakephp-codesniffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakephp%2Fcakephp-codesniffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakephp%2Fcakephp-codesniffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cakephp","download_url":"https://codeload.github.com/cakephp/cakephp-codesniffer/tar.gz/refs/heads/5.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cakephp%2Fcakephp-codesniffer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261967132,"owners_count":23237663,"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-07-31T16:01:23.446Z","updated_at":"2025-06-25T23:07:29.135Z","avatar_url":"https://github.com/cakephp.png","language":"PHP","readme":"# CakePHP Code Sniffer\n\n![Build Status](https://github.com/cakephp/cakephp-codesniffer/actions/workflows/ci.yml/badge.svg?branch=5.next)\n[![Total Downloads](https://img.shields.io/packagist/dt/cakephp/cakephp-codesniffer.svg?style=flat-square)](https://packagist.org/packages/cakephp/cakephp-codesniffer)\n[![Latest Stable Version](https://img.shields.io/packagist/v/cakephp/cakephp-codesniffer.svg?style=flat-square)](https://packagist.org/packages/cakephp/cakephp-codesniffer)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n\nThis code works with [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer)\nand checks code against the coding standards used in CakePHP.\n\nThis sniffer package follows [PSR-12](https://www.php-fig.org/psr/psr-12/) completely and ships with a lot of additional fixers on top.\n\n[List of included sniffs](/docs)\n\n## Which version should I use?\nSee [version map](https://github.com/cakephp/cakephp-codesniffer/wiki).\n\n## Installation\n\nYou should install this codesniffer with composer:\n\n\tcomposer require --dev cakephp/cakephp-codesniffer\n\tvendor/bin/phpcs --config-set installed_paths /path/to/your/app/vendor/cakephp/cakephp-codesniffer\n\nThe second command lets `phpcs` know where to find your new sniffs. Ensure that\nyou do not overwrite any existing `installed_paths` value. Alternatively, install\nthe [`dealerdirect/phpcodesniffer-composer-installer`](https://github.com/Dealerdirect/phpcodesniffer-composer-installer)\ncomposer package which will handle configuring the `phpcs` `installed_paths` for you.\n\n## Usage\n\n:warning: Warning when these sniffs are installed with composer, ensure that\nyou have configured the CodeSniffer `installed_paths` setting.\n\nDepending on how you installed the code sniffer changes how you run it. If you have\ninstalled phpcs, and this package with PEAR, you can do the following:\n\n\tvendor/bin/phpcs --colors -p -s --standard=CakePHP /path/to/code/\n\nYou can also copy the `phpcs.xml.dist` file to your project's root folder as `phpcs.xml`.\nThis file will import the CakePHP Coding Standard. From there you can edit it to\ninclude/exclude as needed. With this file in place, you can run:\n\n\tvendor/bin/phpcs --colors -p -s /path/to/code/\n\nIf you are using Composer to manage your CakePHP project, you can also add the below to your composer.json file:\n\n```json\n{\n    \"scripts\": {\n        \"cs-check\": \"vendor/bin/phpcs --colors -p -s --extensions=php src/ tests/\"\n    }\n}\n```\n\n## Running Tests\n\nYou can run tests with composer. Because of how PHPCS test suites work, there is\nadditional configuration state in `phpcs` that is required.\n\n```bash\ncomposer test\n```\n\nOnce this has been done once, you can use `composer phpunit` to run the\ntests for the rules in this repository.\n\nThe tests are present inside the `CakePHP/Tests/` folder.\n\n## Contributing\n\nIf you'd like to contribute to the Code Sniffer, you can fork the project add\nfeatures and send pull requests.\n\n\u003e [!NOTE]\n\u003e Please make sure to run `composer docs` if you change the ruleset.xml file.\n\n## Releasing CakePHP Code Sniffer\n\n* Create a signed tag\n* Write the changelog in the tag commit\n","funding_links":[],"categories":["PHP","Testing","Framework specific"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcakephp%2Fcakephp-codesniffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcakephp%2Fcakephp-codesniffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcakephp%2Fcakephp-codesniffer/lists"}