{"id":17130317,"url":"https://github.com/natepage/standards","last_synced_at":"2026-03-02T03:32:14.494Z","repository":{"id":57023948,"uuid":"142398027","full_name":"natepage/standards","owner":"natepage","description":"Easy-to-use all in one coding standards package","archived":false,"fork":false,"pushed_at":"2018-11-27T03:39:53.000Z","size":192,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T07:39:31.211Z","etag":null,"topics":["coding-standards","package","php"],"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/natepage.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"license","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-26T06:24:39.000Z","updated_at":"2019-01-31T23:26:45.000Z","dependencies_parsed_at":"2022-08-23T14:20:57.590Z","dependency_job_id":null,"html_url":"https://github.com/natepage/standards","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/natepage/standards","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepage%2Fstandards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepage%2Fstandards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepage%2Fstandards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepage%2Fstandards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natepage","download_url":"https://codeload.github.com/natepage/standards/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepage%2Fstandards/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","package","php"],"created_at":"2024-10-14T19:12:06.182Z","updated_at":"2026-03-02T03:32:14.473Z","avatar_url":"https://github.com/natepage.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Standards\n\nThis package is an easy-to-use all in one coding standards package. It allows you in just a few seconds to check your\ncode against the most popular tools in terms of code quality and have a clear answer about: Are you a champion? Or do you\nstill need improve? (Don't worry if you're reading this, you're already a champion!)\n\n# Installation\n\n[Standards][1] is a package to use during your development process, you can install it using [Composer][2].\n\n## Inside one project\n\nUse composer to add the package as a dev dependency:\n\n```\ncomposer require --dev natepage/standards\n``` \n\nYou can now run the standards tools as:\n\n```\ncd my-project\nphp vendor/bin/standards\n```\n\n## Multiple projects\n\nIf you are working on multiple projects at the same time (which is surely the case for a champion), you can install\nthe package as a global dependency and run it in all your projects:\n\n```\ncomposer global require natepage/standards\n```\n\nTo make your life easier you can set Standards as a local binary to have an handy way to run it from anywhere:\n\n```\n# If your operating system doesn't have /usr/local/bin/ create it\nmkdir /usr/local/bin\n\n# Create a symlink of standards in your local bin\nln -s ~/.composer/vendor/natepage/standards/bin/standards /usr/local/bin/standards\n```\n\nThen you can run it in your projects:\n\n```\ncd my-project\nstandards # Run standards tools\n\ncd my-project2\nstandards # Run standards tools\n```\n\n# Tools\n\n## Default tools\n\nBy default, Standards comes with a collection of tools ready to go and offers you an easy way to customise the different\noptions each tool can have. For any further information about those tools, please feel free to have a look directly at\ntheir documentation.\n\n- [EasyCodingStandard][5]: Easiest way to start using PHP CS Fixer and PHP_CodeSniffer with 0-knowledge\n- [PHPCPD][3]: Copy/Paste Detector (CPD) for PHP code\n- [Paratest][4]: Parallel testing for PHPUnit\n- [PHPMD][6]: Takes a given PHP source code base and look for several potential problems within that source\n- [PHPStan][7]: PHP Static Analysis Tool - discover bugs in your code without running it\n- [PHPUnit][8]: Run unit tests in PHP applications\n- [SecurityChecker][9]: PHP security vulnerabilities monitoring\n\n# Usage\n\n## Standalone\n\nOnce you've required the package using composer, inside an existing project or as a global dependency, you can run the\ntools on your code from your favourite terminal using the binary as follows:\n\n```\n# Using the link created by composer\ncd my-project\nphp vendor/bin/standards\n\n# Using the binary directly\ncd my-project\nphp vendor/natepage/standards/bin/standards\n```\n\n# Configuration\n\nStandards offers you all the flexibility you need via a large panel of options you can configure. Most of them have\ndefault values you can override if you need to.\n\n## Configuration file\n\nIf you want to override configuration every time you run Standards, you can create a `standards.yaml` file at the root\nlevel of your project.\n\n## Command Input Options\n\nWhen running Standards, you can at runtime pass input option to override any exposed configuration.\n\n```\nstandards --only=phpcs,phpmd --phpcs.show-sniff-name=false\n``` \n\nTo know more about all available input options simply use the `-h|-help` option to display to full list.\n\n## Available Configuration\n\nConfig | Default | Description\n-------|---------|------------\ndisplay-config | Display configuration used to run tools | true\nexit-on-failure | Exit on failure or not | false\nonly | Comma separated list of tools to run | NULL\npaths | Comma separated list of directories to run tools on | app,src,tests\nphpcpd.enabled | Enable/Disable PHPCPD | true\nphpcpd.min-lines | The minimum number of lines which need to be duplicated to count as copy/paste | 5\nphpcpd.min-tokens | The minimum number of tokens which need to be duplicated to count as copy/paste | 70\nphpcs.enabled | Enable/Disable PHPCS | true\nphpcs.show-sniff-name | Whether to show the code sniffs name on report output | true\nphpcs.standards | The standards to compare code against, will be ignored if phpcs.xml exists | %standards_path%/sniffs/NatePage\nphpmd.enabled | Enable/Disable PHPMD | true\nphpmd.rule-sets | The rulesets to use to determine issues, will be ignored if phpmd.xml exists | cleancode,codesize,controversial,design,naming,unusedcode\nphpstan.enabled | Enable/Disable PHPStan | true\nphpstan.reporting-level | The reporting level, 1 = loose, 7 = strict | 7\nphpunit.config-file | Config file to use to run PHPUnit | phpunit.xml\nphpunit.coverage-minimum-level | The minimum percentage of coverage to have, will be ignored if coverage check is disabled | 90\nphpunit.enable-code-coverage | Enable/Disable code coverage | true\nphpunit.enabled | Enable/Disable PHPUnit | true\nphpunit.junit-log-path | The path to output junit parseable log file, can be relative, will be ignored if left blank | NULL\nphpunit.paratest-processes-number | Number of processes to run when using paratest | 8\nphpunit.test-directory | The directory containing tests, will be ignored it phpunit.xml exists in working directory | tests\nsecurity-checker.enabled | Enable/Disable security SecurityChecker | true\n\n[1]: https://github.com/natepage/standards\n[2]: https://getcomposer.org/\n[3]: https://github.com/sebastianbergmann/phpcpd\n[4]: https://github.com/paratestphp/paratest\n[5]: https://github.com/Symplify/EasyCodingStandard\n[6]: https://phpmd.org/\n[7]: https://github.com/phpstan/phpstan\n[8]: https://phpunit.de/\n[9]: https://security.symfony.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatepage%2Fstandards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatepage%2Fstandards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatepage%2Fstandards/lists"}