{"id":15114991,"url":"https://github.com/PatricNox/laravel-phpcs","last_synced_at":"2025-09-27T19:31:25.172Z","repository":{"id":41195875,"uuid":"287079921","full_name":"PatricNox/laravel-phpcs","owner":"PatricNox","description":"PHP Codesniffer ruleset to follow Laravel's definition of PSR-12 coding style","archived":false,"fork":false,"pushed_at":"2023-09-05T22:46:36.000Z","size":29,"stargazers_count":39,"open_issues_count":0,"forks_count":24,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-27T20:41:38.261Z","etag":null,"topics":["hacktoberfest","hacktoberfest2022","laravel-ruleset","laravel-standard","php-codesniffer","phpcs-laravel","phpcs-standard","ruleset"],"latest_commit_sha":null,"homepage":"","language":null,"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/PatricNox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-08-12T17:54:41.000Z","updated_at":"2024-10-28T12:43:16.000Z","dependencies_parsed_at":"2022-08-30T01:20:27.003Z","dependency_job_id":null,"html_url":"https://github.com/PatricNox/laravel-phpcs","commit_stats":null,"previous_names":["patricnox/laravel-phpcs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-phpcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-phpcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-phpcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-phpcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatricNox","download_url":"https://codeload.github.com/PatricNox/laravel-phpcs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234453712,"owners_count":18835111,"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":["hacktoberfest","hacktoberfest2022","laravel-ruleset","laravel-standard","php-codesniffer","phpcs-laravel","phpcs-standard","ruleset"],"created_at":"2024-09-26T01:43:38.123Z","updated_at":"2025-09-27T19:31:19.867Z","avatar_url":"https://github.com/PatricNox.png","language":null,"funding_links":[],"categories":["Development"],"sub_categories":["Quality Check"],"readme":"# PHP CodeSniffer rules for Laravel coding style (PSR-2 variant)\n\n[![MIT Licensed](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![PR friendly repository](https://img.shields.io/badge/Pull--Request-are%20welcome!-ff69b4)](/compare)\n![Follow Fossbarrow on Twitter](https://img.shields.io/twitter/follow/fossbarrow?style=social)\n\n\u003e Authored by fossbarrow IO\n\n\n[php codesniffer ruleset](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset) for laravel projects.\n\n## Requirements\n\n- https://github.com/squizlabs/PHP_CodeSniffer\n\n## Table of contents\n\n- [How to install](#install)\n    - [Enabling the rules](#enabling-the-rules)\n    - [Sniffing code](#sniffing-code)\n    - [Sniffing code in PHPStorm](#sniffing-code-in-phpstorm)\n- [License](#license)\n- [Contributing](#contributing)\n- [Credits](#credits)\n\n## Installation\nInstall the ruleset by\n\n1. Copy the `phpcs.xml` file into your project root with phpcs installed.\n\n## Usage\n\n### Enabling the rules\n\n\u003e Only neccesary if you installed as a package using composer!\n\nAdd it to your project `phpcs.xml` or `phpcs.xml.dist` ruleset:\n\n```xml\n\u003c?xml version=\"1.0\"?\u003e\n\u003cruleset\u003e\n    \u003carg name=\"basepath\" value=\".\"/\u003e\n\n    \u003cfile\u003e./app\u003c/file\u003e\n    \u003cfile\u003e./config\u003c/file\u003e\n    \u003cfile\u003e./resources\u003c/file\u003e\n    \u003cfile\u003e./routes\u003c/file\u003e\n    \u003cfile\u003e./tests\u003c/file\u003e\n\n    \u003crule ref=\"./vendor/fossbarrow/laravel-phpcs/phpcs.xml\"/\u003e\n\u003c/ruleset\u003e\n```\n\n### Sniffing code\nUse php CodeSniffer commands, pointed towards your xml file, to sniff the code\nusing the new ruleset.\n\n\u003e vendor/bin/phpcs\n\u003e vendor/bin/phpcbf\n\n#### Sniffing code in PHPStorm\n\nSee [PHP Code Sniffer in PhpStorm](https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm) on how to set up CodeSniffer in PHPStorm.\n\n--------------------------------------------------------------------------------\n\n\n## Contributing\n\nAll changes that makes the sniffer more accurate towards _Laravel_'s coding standard\nis always highly appreciated and welcome. \n\nPlease see [CONTRIBUTING](docs/CONTRIBUTING.md) for more details.\n\n## Credits\n\n- [PatricNox](https://github.com/PatricNox)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPatricNox%2Flaravel-phpcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPatricNox%2Flaravel-phpcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPatricNox%2Flaravel-phpcs/lists"}