{"id":43146756,"url":"https://github.com/InteractionDesignFoundation/coding-standard","last_synced_at":"2026-02-11T20:01:45.905Z","repository":{"id":153034089,"uuid":"627924210","full_name":"InteractionDesignFoundation/coding-standard","owner":"InteractionDesignFoundation","description":"PHPCS coding-standard for Laravel applications and packages","archived":false,"fork":false,"pushed_at":"2025-12-11T22:36:16.000Z","size":146,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-11T18:27:26.160Z","etag":null,"topics":["coding-style","laravel","phpcs-standard"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InteractionDesignFoundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-14T13:55:48.000Z","updated_at":"2025-11-24T09:37:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"acf1bf68-7fda-4276-b3e6-95dc22db863b","html_url":"https://github.com/InteractionDesignFoundation/coding-standard","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/InteractionDesignFoundation/coding-standard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractionDesignFoundation%2Fcoding-standard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractionDesignFoundation%2Fcoding-standard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractionDesignFoundation%2Fcoding-standard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractionDesignFoundation%2Fcoding-standard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InteractionDesignFoundation","download_url":"https://codeload.github.com/InteractionDesignFoundation/coding-standard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteractionDesignFoundation%2Fcoding-standard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29343683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T18:58:20.535Z","status":"ssl_error","status_checked_at":"2026-02-11T18:56:44.814Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-style","laravel","phpcs-standard"],"created_at":"2026-01-31T23:48:24.659Z","updated_at":"2026-02-11T20:01:45.900Z","avatar_url":"https://github.com/InteractionDesignFoundation.png","language":"PHP","readme":"[![Tests](https://github.com/InteractionDesignFoundation/coding-standard/actions/workflows/test.yml/badge.svg)](https://github.com/InteractionDesignFoundation/coding-standard/actions/workflows/test.yml)\n[![PHP Psalm](https://github.com/InteractionDesignFoundation/coding-standard/actions/workflows/psalm.yml/badge.svg)](https://github.com/InteractionDesignFoundation/coding-standard/actions/workflows/psalm.yml)\n[![PHP Psalm Level](https://shepherd.dev/github/InteractionDesignFoundation/coding-standard/level.svg)](https://shepherd.dev/github/InteractionDesignFoundation/coding-standard)\n[![PHP Psalm Type Coverage](https://shepherd.dev/github/InteractionDesignFoundation/coding-standard/coverage.svg)](https://shepherd.dev/github/InteractionDesignFoundation/coding-standard)\n\n# IxDF Coding Standard for Laravel\n\nAn opinionated ruleset focused on strict types.\nSuitable for both applications and packages.\n\n## Installation\n\n1. Install the package via composer by running:\n```shell\ncomposer require --dev interaction-design-foundation/coding-standard\n```\n\n2. Add composer scripts into your `composer.json`:\n```json\n\"scripts\": {\n  \"cs:check\": \"phpcs -p -s --colors --report-full --report-summary\",\n  \"cs:fix\": \"phpcbf -p --colors\"\n}\n```\n\n3. Create file `phpcs.xml` on the base path of your repository with content\n```xml\n\u003c?xml version=\"1.0\"?\u003e\n\u003cruleset name=\"My Coding Standard\"\u003e\n    \u003c!-- Include all rules from the IxDF Coding Standard --\u003e\n    \u003crule ref=\"IxDFCodingStandard\"/\u003e\n\n    \u003c!-- Paths to check --\u003e\n    \u003cfile\u003eapp\u003c/file\u003e\n    \u003cfile\u003econfig\u003c/file\u003e\n    \u003cfile\u003edatabase\u003c/file\u003e\n    \u003cfile\u003elang\u003c/file\u003e\n    \u003cfile\u003eroutes\u003c/file\u003e\n    \u003cfile\u003etests\u003c/file\u003e\n\u003c/ruleset\u003e\n```\n\n## Usage\n\n- To run checks only:\n\n```shell\ncomposer cs:check\n```\n\n- To automatically fix many CS issues:\n\n```shell\ncomposer cs:fix\n```\n\n## Ignoring parts of a File\n\nDisable parts of a file:\n\n```php\n$xmlPackage = new XMLPackage;\n// phpcs:disable\n$xmlPackage['error_code'] = get_default_error_code_value();\n$xmlPackage-\u003esend();\n// phpcs:enable\n```\n\nDisable a specific rule:\n\n```php\n// phpcs:disable Generic.Commenting.Todo.Found\n$xmlPackage = new XMLPackage;\n$xmlPackage['error_code'] = get_default_error_code_value();\n// TODO: Add an error message here.\n$xmlPackage-\u003esend();\n// phpcs:enable\n```\n\nIgnore a specific violation:\n\n```php\n$xmlPackage = new XMLPackage;\n$xmlPackage['error_code'] = get_default_error_code_value();\n// phpcs:ignore Generic.Commenting.Todo.Found\n// TODO: Add an error message here.\n$xmlPackage-\u003esend();\n```\n\n## Development\n\n### Versioning\n\u003e **New rules or Sniffs may not be introduced in minor or bugfix releases and should always be based on the develop\nbranch and queued for the next major release, unless considered a bugfix for existing rules.**\n\n\n## Reference\n\nRules can be added, excluded or tweaked locally, depending on your preferences.\nMore information on how to do this can be found here:\n\n- [Coding Standard Tutorial](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial)\n- [Configuration Options](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options)\n- [Selectively Applying Rules](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset#selectively-applying-rules)\n- [Customisable Sniff Properties](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties)\n- Other coding standards (inspiring us):\n  - [Slevomat coding standard](https://github.com/slevomat/coding-standard)\n  - [Doctrine coding standard](https://github.com/doctrine/coding-standard)\n  - [Laminas coding standard](https://github.com/laminas/laminas-coding-standard)\n","funding_links":[],"categories":["Framework specific"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInteractionDesignFoundation%2Fcoding-standard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FInteractionDesignFoundation%2Fcoding-standard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FInteractionDesignFoundation%2Fcoding-standard/lists"}