{"id":18643548,"url":"https://github.com/lemberg/laravel-code-style-command","last_synced_at":"2026-02-16T14:12:42.031Z","repository":{"id":57013754,"uuid":"120289473","full_name":"lemberg/laravel-code-style-command","owner":"lemberg","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-14T11:07:24.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-09-21T19:55:51.782Z","etag":null,"topics":[],"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/lemberg.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-05T10:25:45.000Z","updated_at":"2019-03-14T11:07:25.000Z","dependencies_parsed_at":"2022-08-21T13:30:08.839Z","dependency_job_id":null,"html_url":"https://github.com/lemberg/laravel-code-style-command","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/lemberg/laravel-code-style-command","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemberg%2Flaravel-code-style-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemberg%2Flaravel-code-style-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemberg%2Flaravel-code-style-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemberg%2Flaravel-code-style-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lemberg","download_url":"https://codeload.github.com/lemberg/laravel-code-style-command/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lemberg%2Flaravel-code-style-command/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29509524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"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":[],"created_at":"2024-11-07T06:07:20.287Z","updated_at":"2026-02-16T14:12:42.017Z","avatar_url":"https://github.com/lemberg.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Code Style Command\n\nThis package adds simple `artisan` command over [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) script.\nValidate [PSR2](https://www.php-fig.org/psr/psr-2/) coding standard in you application.\n\n## Requirements\n\n* PHP \u003e= `7.0`\n* Laravel = `5.5.*|5.8.*`\n\n## Getting Started\n\nAdd the package in your `composer.json`\n\n```\n$ composer require --dev lemberg/laravel-code-style-command\n```\n\nSo that's all :)\n\nCheck you code style in `app/` directory.\n\n```\n$ php artisan code-style\n```\n\nExample output:\n\n```\nFILE: .../bkhrupa/work/lemberg/laravel-code-style-command/app/User.php\n----------------------------------------------------------------------\nFOUND 1 ERROR AFFECTING 1 LINE\n----------------------------------------------------------------------\n 8 | ERROR | [x] Opening brace of a class must be on the line after\n   |       |     the definition\n----------------------------------------------------------------------\nPHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n----------------------------------------------------------------------\n\nTime: 116ms; Memory: 6Mb\n\nFinished\n```\n\n## Advance usage\n\n```\n$ php artisan code-style --help\n```\n\n### Config file\n\nPublish `code-style.php` config file.\n\n```\n$ php artisan vendor:publish --provider=\"Lemberg\\LaravelCsc\\LaravelCscServiceProvider\"\n```\n\n### Git pre-commit hook\n\nUse git [pre-commit](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) hook\n\nAdd next code to pre commit hooks file **.git/hooks/pre-commit**.\n\n```\n#!/bin/bash\n\n`php ./artisan code-style --print-command`\n```\n\n`pre-commit` hook must be executable\n\n```\n$ chmod +x .git/hooks/pre-commit\n```\n\n## License\n\nPlease see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemberg%2Flaravel-code-style-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flemberg%2Flaravel-code-style-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flemberg%2Flaravel-code-style-command/lists"}