{"id":18517877,"url":"https://github.com/consistence/coding-standard","last_synced_at":"2025-05-16T07:07:21.108Z","repository":{"id":31488251,"uuid":"35052408","full_name":"consistence/coding-standard","owner":"consistence","description":"Consistence - Coding Standard - PHP Code Sniffer rules","archived":false,"fork":false,"pushed_at":"2025-03-10T13:49:38.000Z","size":206,"stargazers_count":74,"open_issues_count":9,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-09T23:36:35.473Z","etag":null,"topics":["coding-standards","consistence","php","php-codesniffer"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/consistence.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}},"created_at":"2015-05-04T18:38:36.000Z","updated_at":"2025-03-07T11:24:28.000Z","dependencies_parsed_at":"2024-06-18T12:20:02.677Z","dependency_job_id":"58ac276b-31ed-4d0d-9f2a-a702d1f1d072","html_url":"https://github.com/consistence/coding-standard","commit_stats":{"total_commits":144,"total_committers":7,"mean_commits":"20.571428571428573","dds":0.06944444444444442,"last_synced_commit":"5721f22ef1985f752aa0bf05d51106aba464dfec"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consistence%2Fcoding-standard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consistence%2Fcoding-standard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consistence%2Fcoding-standard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/consistence%2Fcoding-standard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/consistence","download_url":"https://codeload.github.com/consistence/coding-standard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485065,"owners_count":22078767,"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":["coding-standards","consistence","php","php-codesniffer"],"created_at":"2024-11-06T17:10:03.089Z","updated_at":"2025-05-16T07:07:16.099Z","avatar_url":"https://github.com/consistence.png","language":"PHP","readme":"Consistence Coding Standard\n===========================\n\n\u003e **Complete standard is described in a [separate document](consistence-coding-standard.md)**.\n\nThis is a custom coding standard, which is used by all Consistence projects. It is also suitable to be used with any other project or as a foundation for your own standard.\n\nThe main objectives of this standard are:\n\n* Strict (and predictable) code.\n* Prevent common mistakes.\n* Readability over writability (character count).\n* Be friendly to diffs - minimize impact of changes.\n* Do not write unnecessary/unreliable information.\n\nAutomatic checks\n----------------\n\nAutomatic checks of this standard are implemented as sniffs for [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) (`phpcs`), but not all the rules are checked yet. PHP_CodeSniffer contains also tool for automatic correction of certain errors `phpcbf`, but this tool is also not 100% reliable - results produced by this may not conform to this standard.\n\nThese checks also include some code analysis tools, such as detecting unreachable code etc. These are not part of the standard, but should be helpful.\n\nStability\n---------\n\nThis package uses [SemVer](http://semver.org/) with following rules.\n\nCoding Standard document should be considered the source of truth and main object of SemVer.\n* `MAJOR` version will be incremented if new rules are added to the document.\n* `MINOR` version will be incremented if new sniffs are implemented to check for existing described rules.\n* `PATCH` version will be incremented for bug fixing - fixing a bug is considered everything which does not conform to the document - this may even lead to (temporarily) disabling an existing sniff - or part of it, until a better check is available or it is properly fixed.\n\nThe implementation of the automatic checks (both custom sniffs and the ruleset.xml file) are not subject to the SemVer and may change over time to accommodate changes in PHP_CodeSniffer and provided default sniffs, which are used also by this standard.\n\nRecommended dependency on this package is on `MINOR` version (e.g. `~1.0.0`), which means effectively:\n* No new rules will be added.\n* New automatic checks may be added.\n* You get fixes for existing automatic checks, or some of them may be disabled, if regressions are found.\n\nInstallation \u0026 usage\n--------------------\n\nInstall package [`consistence/coding-standard`](https://packagist.org/packages/consistence/coding-standard) with [Composer](https://getcomposer.org/):\n\n```bash\ncomposer require --dev consistence/coding-standard\n```\n\nThen run `phpcs` with this standard:\n``` bash\nvendor/bin/phpcs --standard=vendor/consistence/coding-standard/Consistence/ruleset.xml --extensions=php --encoding=utf-8 -sp src\n```\n\nFor further usage options see the [PHP_CodeSniffer documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconsistence%2Fcoding-standard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconsistence%2Fcoding-standard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconsistence%2Fcoding-standard/lists"}