{"id":15062748,"url":"https://github.com/brackets-by-triad/code-style-fixer","last_synced_at":"2025-04-10T14:21:43.717Z","repository":{"id":34745781,"uuid":"183307117","full_name":"BRACKETS-by-TRIAD/code-style-fixer","owner":"BRACKETS-by-TRIAD","description":"Composer package to fix code style of php application.","archived":false,"fork":false,"pushed_at":"2022-03-10T13:17:10.000Z","size":38,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T13:03:57.617Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BRACKETS-by-TRIAD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-24T21:08:24.000Z","updated_at":"2022-03-10T12:58:48.000Z","dependencies_parsed_at":"2022-08-08T02:00:21.164Z","dependency_job_id":null,"html_url":"https://github.com/BRACKETS-by-TRIAD/code-style-fixer","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRACKETS-by-TRIAD%2Fcode-style-fixer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRACKETS-by-TRIAD%2Fcode-style-fixer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRACKETS-by-TRIAD%2Fcode-style-fixer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BRACKETS-by-TRIAD%2Fcode-style-fixer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BRACKETS-by-TRIAD","download_url":"https://codeload.github.com/BRACKETS-by-TRIAD/code-style-fixer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248233935,"owners_count":21069493,"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":[],"created_at":"2024-09-24T23:45:45.543Z","updated_at":"2025-04-10T14:21:43.681Z","avatar_url":"https://github.com/BRACKETS-by-TRIAD.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PhpCsFixer and Git Hooks\n\nThis repository is the source for Php Cs Fixer installation to your project. It uses brainmaestro/composer-git-hooks and friendsofphp/php-cs-fixer for its purpose and creates only wrapper for this packages.\n\nFirst you need to require this composer package: \n\n```\ncomposer require --dev brackets/code-style-fixer\n```\n\nNext you have to add this to script section of `composer.json`\n\n```\n\"scripts\": {\n    ...\n    \"post-install-cmd\": [\n        ...\n        \"[ $COMPOSER_DEV_MODE -eq 0 ] || ./vendor/bin/code-style-fixer.sh git-hooks-add --ignore-lock\"\n    ],\n    \"post-update-cmd\": [\n        ...\n        \"[ $COMPOSER_DEV_MODE -eq 0 ] || ./vendor/bin/code-style-fixer.sh git-hooks-update\"\n    ]\n}\n```\n\nAnd then you have to install the package\n\n```\n./vendor/bin/code-style-fixer.sh install\n```\n\nNow you should have installed the package and on every pre-commit the fixer will run. On every pre-push the fixer will run, but only to check if everything is ok. If not, push will fail.\n\n## Additional commands\n\n### Git Hooks\n\nYou can manipulate the git hooks by\n \n```\n./vendor/bin/code-style-fixer.sh git-hooks-add | git-hooks-update | git-hooks-remove | git-hooks-list\n```\n\nThis commands are just wrapper for brainmaestro/composer-git-hooks package, so see https://github.com/BrainMaestro/composer-git-hooks for readme.\n\n### Php Cs Fixer\n\nTo manually run phpCsFixer script use\n\n```\n./vendor/bin/code-style-fixer.sh fix\n```\n\nYou can use all parameters defined in https://github.com/FriendsOfPHP/PHP-CS-Fixer, the fix command is just a wrapper for php-cs-fixer.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrackets-by-triad%2Fcode-style-fixer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrackets-by-triad%2Fcode-style-fixer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrackets-by-triad%2Fcode-style-fixer/lists"}