{"id":15093565,"url":"https://github.com/codeigniter4/coding-standard","last_synced_at":"2025-10-06T13:30:23.511Z","repository":{"id":47082590,"uuid":"95716830","full_name":"codeigniter4/coding-standard","owner":"codeigniter4","description":"DEPRECATED! CodeIgniter 4 Coding Standard for PHP_CodeSniffer 3.","archived":true,"fork":false,"pushed_at":"2022-11-03T10:25:20.000Z","size":229,"stargazers_count":69,"open_issues_count":1,"forks_count":13,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-05-17T04:01:30.234Z","etag":null,"topics":["codeigniter","codeigniter4","codeigniter4-standard","php-codesniffer"],"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/codeigniter4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-28T22:27:32.000Z","updated_at":"2024-03-12T12:42:03.000Z","dependencies_parsed_at":"2022-09-10T19:10:58.574Z","dependency_job_id":null,"html_url":"https://github.com/codeigniter4/coding-standard","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/codeigniter4%2Fcoding-standard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4%2Fcoding-standard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4%2Fcoding-standard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeigniter4%2Fcoding-standard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeigniter4","download_url":"https://codeload.github.com/codeigniter4/coding-standard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235527720,"owners_count":19004370,"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":["codeigniter","codeigniter4","codeigniter4-standard","php-codesniffer"],"created_at":"2024-09-25T11:24:02.920Z","updated_at":"2025-10-06T13:30:18.118Z","avatar_url":"https://github.com/codeigniter4.png","language":"PHP","readme":"## Deprecated\n\nThe new [CodeIgniter Coding Standard](https://github.com/CodeIgniter/coding-standard) is officially published!\nThis switch uses PHP CS Fixer instead of Code Sniffer and applies a lot of changes (most notably, PSR-12 compliance).\nVisit the repo for more information. This library will remain in place but may not be maintained and is no longer\nconsidered compliant with official CodeIgniter 4 framework styles.\n\n# CodeIgniter4-Standard\n\n[CodeIgniter](https://codeigniter.com) 4 coding standard for use with [PHP_CodeSniffer 3](https://github.com/squizlabs/PHP_CodeSniffer).\n\nVersion 1\n\n| Master | Develop |\n| :---: | :---: |\n| [![Build Status](https://travis-ci.org/bcit-ci/CodeIgniter4-Standard.svg?branch=master)](https://travis-ci.org/bcit-ci/CodeIgniter4-Standard) | [![Build Status](https://travis-ci.org/bcit-ci/CodeIgniter4-Standard.svg?branch=develop)](https://travis-ci.org/bcit-ci/CodeIgniter4-Standard) |\n| [![Coverage Status](https://coveralls.io/repos/github/bcit-ci/CodeIgniter4-Standard/badge.svg?branch=master)](https://coveralls.io/github/bcit-ci/CodeIgniter4-Standard?branch=master) | [![Coverage Status](https://coveralls.io/repos/github/bcit-ci/CodeIgniter4-Standard/badge.svg?branch=develop)](https://coveralls.io/github/bcit-ci/CodeIgniter4-Standard?branch=develop) |\n\n***This is currently a work in progress.***\n\n*Requested at: https://github.com/bcit-ci/CodeIgniter4/issues/182*\n\n## Requirements\n\n[PHP_CodeSniffer 3](https://github.com/squizlabs/PHP_CodeSniffer). (3.1.1 or greater).\n\nPHP (7.1 or greater) with mbstring extension.\n\n## Install\n\n### Composer install\n\n`cd /Path/To/MyProject`\n`composer require codeigniter4/codeigniter4-standard --dev`\n\nSet the `phpcs standard path` and `phpcbf standard path` in your editor/plugin config to:\n\n`/Path/To/MyProject/vendor/codeigniter4/codeigniter4-standard/CodeIgniter4/ruleset.xml`\n\n### Download install\n\nDownload [CodeIgniter4-Standard](https://github.com/bcit-ci/CodeIgniter4-Standard/archive/v1.0.1.zip).\n\nSet `standard ` paths to your local filesystem:\n\n`'/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`\n\n### Global install\n\nGlobally [install PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/README.md) with one of the various methods.\n\nOnce complete you should be able to execute `phpcs -i` on the command line.\n\nYou should see something like:-\n\n`The installed coding standards are MySource, PEAR, PSR1, PSR2, Squiz and Zend.`\n\nEither clone this repository...\n\n`git clone -b master --depth 1 https://github.com/bcit-ci/CodeIgniter4-Standard.git`.\n\nor use composer...\n\n`composer global require codeigniter4/codeigniter4-standard`\n\nor download.\n\nTake note of the paths where they were installed.\n\nCreate a symbolic link to the `CodeIgniter4-Standard/CodeIgniter4` directory in `php_codesniffer/src/Standards/` eg.\n\n`ln -s ~/Documents/Projects/CodeIgniter4-Standard/CodeIgniter4 ~/.composer/vendor/squizlabs/php_codesniffer/src/Standards/CodeIgniter4`\n\nor copy the `CodeIgniter4-Standard/CodeIgniter4` directory to `php_codesniffer/src/Standards/`\n\nExecuting `phpcs -i` should now show CodeIgniter4 installed eg.\n\n`The installed coding standards are CodeIgniter4, MySource, PEAR, PSR1, PSR2, Squiz and Zend.`\n\nYou should now be able to set 'CodeIgniter4' as the phpcs standard in the plugin/editor/IDE of your choice.\n\n### Command line use\n\n#### Sniffing errors \u0026 warnings (reporting).\n\nSingle file...\n\n`phpcs /Path/To/MyFile.php --standard='/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`\n\nor if globally installed.\n\n`phpcs /Path/To/MyFile.php --standard=CodeIgniter4`\n\nDirectory (recursive).\n\n`phpcs /Path/To/MyProject --standard='/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`\n\nor if globally installed.\n\n`phpcs /Path/To/MyProject --standard=CodeIgniter4`\n\n#### Fixing fixable errors.\n\nSingle file.\n\n`phpcbf /Path/To/MyFile.php --standard='/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`\n\nor if globally installed.\n\n`phpcbf /Path/To/MyFile.php --standard=CodeIgniter4`\n\nDirectory (recursive).\n\n`phpcbf /Path/To/MyProject --standard='/Path/To/CodeIgniter4-Standard/CodeIgniter4/ruleset.xml'`\n\nor if globally installed.\n\n`phpcbf /Path/To/MyProject --standard=CodeIgniter4`\n\n## Credits\n\nThanks to Greg Sherwood, Marc McIntyre, Andy Grunwald, Thomas Ernest and Erik Torsner, for providing open source code which helped me build this standard and a big thanks to [Squiz Labs](http://www.squizlabs.com) for creating [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer).\n\nThanks to [EllisLab](https://ellislab.com) for originally creating CodeIgniter and the [British Columbia Institute of Technology](https://bcit.ca/) for continuing the project. Thanks to all the developers and contibutors working on [CodeIgniter 4](https://github.com/bcit-ci/CodeIgniter4).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeigniter4%2Fcoding-standard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeigniter4%2Fcoding-standard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeigniter4%2Fcoding-standard/lists"}