{"id":28855436,"url":"https://github.com/spiral/code-style","last_synced_at":"2026-02-14T12:37:20.481Z","repository":{"id":47308078,"uuid":"213853076","full_name":"spiral/code-style","owner":"spiral","description":"Code-Style sniffer and fixer rules and CLI command","archived":false,"fork":false,"pushed_at":"2025-10-06T17:25:25.000Z","size":72,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-06T19:09:34.891Z","etag":null,"topics":["code-style","cs-fixer","per-2","php","psr-12","spiral"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/spiral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"spiral"}},"created_at":"2019-10-09T07:41:50.000Z","updated_at":"2025-10-06T17:24:53.000Z","dependencies_parsed_at":"2024-10-23T15:46:10.981Z","dependency_job_id":"6175c384-45c8-416b-b49d-5f1fa06a89e8","html_url":"https://github.com/spiral/code-style","commit_stats":{"total_commits":25,"total_committers":5,"mean_commits":5.0,"dds":0.64,"last_synced_commit":"4a06e64897be84fba0976627ab4c6b52d34dfc19"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/spiral/code-style","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fcode-style","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fcode-style/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fcode-style/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fcode-style/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spiral","download_url":"https://codeload.github.com/spiral/code-style/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiral%2Fcode-style/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"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":["code-style","cs-fixer","per-2","php","psr-12","spiral"],"created_at":"2025-06-19T23:05:35.919Z","updated_at":"2026-02-14T12:37:20.475Z","avatar_url":"https://github.com/spiral.png","language":"PHP","funding_links":["https://github.com/sponsors/spiral"],"categories":[],"sub_categories":[],"readme":"# Code style presets for Spiral components\n\nThis repository contains ruleset for [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) based on PER-2.\n\n## Installation and configuration\n\nInstall the package via composer:\n\n```\ncomposer require --dev spiral/code-style\n```\n\n[![PHP](https://img.shields.io/packagist/php-v/spiral/code-style.svg?style=flat-square\u0026logo=php)](https://packagist.org/packages/spiral/code-style)\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/spiral/code-style.svg?style=flat-square\u0026logo=packagist)](https://packagist.org/packages/spiral/code-style)\n[![License](https://img.shields.io/packagist/l/spiral/code-style.svg?style=flat-square)](LICENSE.md)\n[![Total Downloads](https://img.shields.io/packagist/dt/spiral/code-style.svg?style=flat-square)](https://packagist.org/packages/spiral/code-style)\n\nCreate a configuration file `.php-cs-fixer.dist.php` in the root of your project:\n\n```php\n\u003c?php declare(strict_types=1);\n\nrequire_once 'vendor/autoload.php';\n\nreturn \\Spiral\\CodeStyle\\Builder::create()\n    -\u003einclude(__DIR__ . '/src')\n    -\u003einclude(__FILE__)\n    -\u003ebuild();\n```\n\nFeel free to adjust the paths to include/exclude files and directories.\n\n## Usage\n\nTo more convenient usage, you can add the following commands to the `scripts` section of the `composer.json` file:\n\n```json\n{\n    \"scripts\": {\n        \"cs:diff\": \"php-cs-fixer fix --dry-run -v --diff\",\n        \"cs:fix\": \"php-cs-fixer fix -v\"\n    }\n}\n```\n\nNow you can run the following commands:\n\n```bash\ncomposer cs:diff\ncomposer cs:fix\n```\n\n## CI integration\n\nIf you want to integrate code style check into CI, add the following step to your GitHub Actions configuration file:\n\n```yaml\non:\n  push:\n    branches:\n      - '*'\n\nname: Check Code Style\n\njobs:\n  cs-check:\n    uses: spiral/gh-actions/.github/workflows/cs.yml@master\n```\n\nIf you want GitHub Actions to automatically fix the found errors, add the following step:\n\n```yaml\non:\n  push:\n    branches:\n      - '*'\n\nname: Fix Code Style\n\njobs:\n  cs-fix:\n    permissions:\n      contents: write\n    uses: spiral/gh-actions/.github/workflows/cs-fix.yml@master\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiral%2Fcode-style","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspiral%2Fcode-style","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspiral%2Fcode-style/lists"}