{"id":13669293,"url":"https://github.com/antonioribeiro/laravelcs","last_synced_at":"2025-04-04T13:08:51.235Z","repository":{"id":24254293,"uuid":"27647862","full_name":"antonioribeiro/laravelcs","owner":"antonioribeiro","description":"Laravel PHP_CodeSniffer","archived":false,"fork":false,"pushed_at":"2021-12-20T08:19:57.000Z","size":18,"stargazers_count":235,"open_issues_count":13,"forks_count":32,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T12:04:21.871Z","etag":null,"topics":["code-sniffer","coding-standards","laravel","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonioribeiro.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-06T20:21:34.000Z","updated_at":"2025-01-23T14:24:46.000Z","dependencies_parsed_at":"2022-08-24T04:11:32.595Z","dependency_job_id":null,"html_url":"https://github.com/antonioribeiro/laravelcs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioribeiro%2Flaravelcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioribeiro%2Flaravelcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioribeiro%2Flaravelcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonioribeiro%2Flaravelcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonioribeiro","download_url":"https://codeload.github.com/antonioribeiro/laravelcs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247178478,"owners_count":20896854,"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":["code-sniffer","coding-standards","laravel","php"],"created_at":"2024-08-02T08:01:08.793Z","updated_at":"2025-04-04T13:08:51.213Z","avatar_url":"https://github.com/antonioribeiro.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Laravel PHP_CodeSniffer\n### This is a custom Sniff to detect violations and reformat PHP source code based on [Laravel Coding Standard](http://laravel.com/docs/4.2/contributions#coding-style).\n\nYour source code will be checked for PSR-1 \u0026 the Laravel \"flavor\" of PSR-2.\n\n### Usage wih git\n\nClone this repository\n\n    git clone http://github.com/antonioribeiro/laravelcs LaravelCodeSniffer\n\nExecute CodeSniffer\n\n    phpcs --standard=LaravelCodeSniffer/Standards/Laravel/  /path/to/your/project/files\n\n### Usage with [Composer](https://getcomposer.org/doc/00-intro.md#installation-nix)\n\nThe recommended way is to install it globally with the following command:\n\n    composer global require pragmarx/laravelcs\n\nMake sure you have `~/.composer/vendor/bin/` in your PATH.\n\nYou will then be able to run PHP Code Sniffer with the Laravel Standard:\n\n    phpcs --standard=$HOME/.composer/vendor/pragmarx/laravelcs/Standards/Laravel/ /path/to/your/project/files\n\n### Testing the Sniff\n\nThis Sniff was tested using the Laravel Framework source code and some changes, to comply with PSR-2, were required, [click here to see them](http://github.com/antonioribeiro/laravelcs/compare/096884846fa385e54a7e4eeb43547a9137fdf047...d78508f9e5633bc0f776f730dcc6f1e0a9c8daec). Those were the violations found and fixed in Filesystem.php:\n\n```\n --------------------------------------------------------------------------------\n FOUND 14 ERRORS AFFECTING 11 LINES\n --------------------------------------------------------------------------------\n   29 | ERROR | [x] Inline control structures are not allowed\n   44 | ERROR | [x] Inline control structures are not allowed\n  113 | ERROR | [x] Expected 1 new line after closing parenthesis; found \" \"\n  113 | ERROR | [x] Expected 1 newline after opening brace; 0 found\n  113 | ERROR | [x] Inline control structures are not allowed\n  113 | ERROR | [x] Closing brace must be on a line by itself\n  241 | ERROR | [x] Inline control structures are not allowed\n  247 | ERROR | [ ] Opening brace should be on the same line as the declaration\n  249 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 3\n  310 | ERROR | [x] Inline control structures are not allowed\n  335 | ERROR | [x] Inline control structures are not allowed\n  343 | ERROR | [x] Inline control structures are not allowed\n  361 | ERROR | [x] Inline control structures are not allowed\n  384 | ERROR | [x] Inline control structures are not allowed\n --------------------------------------------------------------------------------\n PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n --------------------------------------------------------------------------------\n```\n\n### Contributing\n\nThere are probably still a lot to do here, so please, open issues and send pull requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonioribeiro%2Flaravelcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonioribeiro%2Flaravelcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonioribeiro%2Flaravelcs/lists"}