{"id":36977582,"url":"https://github.com/chefsplate/sniffer-rules","last_synced_at":"2026-01-13T22:46:45.720Z","repository":{"id":56951969,"uuid":"96346237","full_name":"chefsplate/sniffer-rules","owner":"chefsplate","description":"Official ChefsPlate Sniffer Rules for the PHP Dev Team.","archived":false,"fork":false,"pushed_at":"2017-07-05T18:16:18.000Z","size":12,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-29T16:49:03.296Z","etag":null,"topics":["chefsplate","codesniffer","codestyle","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chefsplate.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":"2017-07-05T17:49:57.000Z","updated_at":"2024-03-29T16:49:03.297Z","dependencies_parsed_at":"2022-08-21T09:20:15.852Z","dependency_job_id":null,"html_url":"https://github.com/chefsplate/sniffer-rules","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/chefsplate/sniffer-rules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefsplate%2Fsniffer-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefsplate%2Fsniffer-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefsplate%2Fsniffer-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefsplate%2Fsniffer-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chefsplate","download_url":"https://codeload.github.com/chefsplate/sniffer-rules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chefsplate%2Fsniffer-rules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28403288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: 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":["chefsplate","codesniffer","codestyle","php"],"created_at":"2026-01-13T22:46:45.631Z","updated_at":"2026-01-13T22:46:45.710Z","avatar_url":"https://github.com/chefsplate.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phpcs 2.0+ Laravel 4/5 Command\n[![Build Status](https://travis-ci.org/ChefsPlate/sniffer-rules.svg?branch=master)](https://travis-ci.org/ChefsPlate/sniffer-rules)\n[![Latest Stable Version](https://poser.pugx.org/ChefsPlate/sniffer-rules/version.png)](https://packagist.org/packages/ChefsPlate/sniffer-rules)\n[![License](https://poser.pugx.org/ChefsPlate/sniffer-rules/license.svg)](https://packagist.org/packages/ChefsPlate/sniffer-rules)\n\nThis is a [Laravel](http://laravel.com/) 4/5 package that hooks up\n[SquizLabs CodeSniffer 2](https://github.com/squizlabs/PHP_CodeSniffer)\ninto Laravel-based apps. It can also be used manually, so read on.\n\nDetect violations of a defined coding standard. It helps your code remain\nclean and consistent. Available options are: **PSR2**, **PSR1**, **Zend**,\n**PEAR**, **Squiz**, **PHPCS** and **ChefsPlate**.\n\n### Setup\n\nRequire this package in composer:\n\n```\n$ composer require chefsplate/sniffer-rules\n```\n\n#### Laravel 4/5\n\nIn your `config/app.php` add `ChefsPlate\\SnifferRules\\ServiceProvider:class`\nto `$providers` array:\n\n```php\n'providers' =\u003e [\n    ...\n\n    ChefsPlate\\SnifferRules\\ServiceProvider::class,\n\n    ...\n],\n```\n#### Laravel 5: Publish the configuration file\n\n```bash\n$ php artisan vendor:publish\n```\n\n#### Laravel 4: Manually create config\n\nCopy [config](src/ChefsPlate/SnifferRules/config/config.php) to\n`app/config/sniffer-rules.php`\n\nEdit configuration file `config/sniffer-rules.php` to tweak the sniffer behavior.\n\n#### Manual\n\nInstall our _Standard_ by configuring **PHP_CodeSniffer** to look for it.\n\n```bash\n$ php ./vendor/bin/phpcs --config-set installed_paths ./vendor/chefsplate/src/ChefsPlate/SnifferRules/Standard/\n```\n\n### Usage\n#### Laravel\n```bash\n$ php artisan sniff\n```\n\nTo run the sniffer in a CI environment, the `-n` option should be set to remove\ninteraction:\n\n```\n$ php artisan sniff -n\n```\n\n#### Manual\n\n```bash\n$ php ./vendor/bin/phpcs --standard=ChefsPlate path/to/code\n```\n\nIt's encouraged to add a [`Makefile`](Makefile) to your project that makes it\ntrivial for other developers. Use `Makefile` in this directory and adjust as\nneeded to fit your project requirements.\n\n## ChefsPlate Coding Standards\n\n### Coding standards\n\n* [PSR 2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)\n* [PSR 1 Coding Standards](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)\n* [PSR 0 Coding Standards](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)\n\n#### Addendum and Clarifications\n\n* `namespace` should be on the same line as opening php tag. e.g.: `\u003c?php namespace ChefsPlate\\Amazing`\n* Property names should be snake_case\n* Test names should use underscores, not camelCase. e.g.: `test_cats_love_catnip`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchefsplate%2Fsniffer-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchefsplate%2Fsniffer-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchefsplate%2Fsniffer-rules/lists"}