{"id":19973952,"url":"https://github.com/marioblazek/coding-standard","last_synced_at":"2025-08-01T11:05:52.413Z","repository":{"id":58881858,"uuid":"534344727","full_name":"MarioBlazek/coding-standard","owner":"MarioBlazek","description":"My personal coding style configuration","archived":false,"fork":false,"pushed_at":"2022-09-09T09:31:36.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T10:12:45.371Z","etag":null,"topics":["coding-standard","php","php-cs-fixer"],"latest_commit_sha":null,"homepage":"","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/MarioBlazek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-09-08T18:31:16.000Z","updated_at":"2022-09-08T18:58:09.000Z","dependencies_parsed_at":"2022-09-20T00:13:13.725Z","dependency_job_id":null,"html_url":"https://github.com/MarioBlazek/coding-standard","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioBlazek%2Fcoding-standard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioBlazek%2Fcoding-standard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioBlazek%2Fcoding-standard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarioBlazek%2Fcoding-standard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarioBlazek","download_url":"https://codeload.github.com/MarioBlazek/coding-standard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241406580,"owners_count":19958012,"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":["coding-standard","php","php-cs-fixer"],"created_at":"2024-11-13T03:13:27.945Z","updated_at":"2025-03-01T18:26:56.944Z","avatar_url":"https://github.com/MarioBlazek.png","language":"PHP","readme":"# Coding Standard\n\nThis repository provides a default coding standard configuration. The config is based on\nPHP CS Fixer and inspired by the Netgen Layouts Coding Standards.\n\n## Installation\n\n```bash\n$ composer require --dev marioblazek/coding-standard\n```\n\nThe list of available rules can be found [here](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/rules/index.rst).\n\n## Usage\n\nCreate a `.php-cs-fixer.php` file in the root of your project with the following:\n\n```php\nreturn (new Marek\\CodingStandard\\PhpCsFixer\\Config())\n    -\u003esetFinder(\n        PhpCsFixer\\Finder::create()\n            -\u003eexclude(['vendor'])\n            -\u003ein(__DIR__)\n    )\n;\n```\n\nRun the fixer with:\n\n```bash\n$ vendor/bin/php-cs-fixer fix\n```\n\n## Overriding existing rules\n\nYou can override rules included in this config per project:\n\n```php\nreturn (new Marek\\CodingStandard\\PhpCsFixer\\Config())\n    -\u003eaddRules([\n        'list_syntax' =\u003e ['syntax' =\u003e 'long'],\n    ])\n    -\u003esetFinder(\n        PhpCsFixer\\Finder::create()\n            -\u003eexclude(['vendor'])\n            -\u003ein(__DIR__)\n    )\n;\n```\n\n## Supporting PHAR distribution of PHP CS Fixer\n\nYou can also support running PHAR version of PHP CS Fixer by adding the\nfollowing at the top of your `.php-cs-fixer.php` file:\n\n```php\n// To support running PHP CS Fixer via PHAR file (e.g. in GitHub Actions)\nrequire_once __DIR__ . '/vendor/marioblazek/coding-standard/src/PhpCsFixer/Config.php';\n```\n\nThis is e.g. useful if you wish to run PHP CS Fixer via GitHub action, which\ndoes not need running `composer install`:\n\n```yaml\n# .github/workflows/ci.yml\nname: PHP CS Fixer\non: [push, pull_request]\n\njobs:\n  php-cs-fixer:\n    name: PHP CS Fixer\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions/checkout@v2\n        with:\n          repository: marioblazek/coding-standard\n          path: vendor/marioblazek/coding-standard\n      - name: PHP CS Fixer\n        uses: OskarStark/php-cs-fixer-ga@master\n        with:\n          args: --diff --dry-run\n```\n\nCheck https://github.com/OskarStark/php-cs-fixer-ga for more details.\n\n## Changelog\n\nChangelog is available [here](CHANGELOG.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioblazek%2Fcoding-standard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarioblazek%2Fcoding-standard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarioblazek%2Fcoding-standard/lists"}