{"id":16458144,"url":"https://github.com/akalongman/php-code-style","last_synced_at":"2025-03-16T18:31:23.107Z","repository":{"id":51721024,"uuid":"94526712","full_name":"akalongman/php-code-style","owner":"akalongman","description":"PHP Code style configuration (PHPCS, etc)","archived":false,"fork":false,"pushed_at":"2024-07-31T13:32:04.000Z","size":128,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T23:44:12.064Z","etag":null,"topics":["laravel","phpcs","sniffer"],"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/akalongman.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-16T09:09:34.000Z","updated_at":"2024-07-31T13:32:08.000Z","dependencies_parsed_at":"2024-06-20T22:08:35.721Z","dependency_job_id":null,"html_url":"https://github.com/akalongman/php-code-style","commit_stats":{"total_commits":72,"total_committers":2,"mean_commits":36.0,"dds":0.01388888888888884,"last_synced_commit":"62995e1321542a5492a32e0405394a58fb7e60ad"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akalongman%2Fphp-code-style","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akalongman%2Fphp-code-style/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akalongman%2Fphp-code-style/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akalongman%2Fphp-code-style/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akalongman","download_url":"https://codeload.github.com/akalongman/php-code-style/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826788,"owners_count":20354220,"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":["laravel","phpcs","sniffer"],"created_at":"2024-10-11T10:44:22.797Z","updated_at":"2025-03-16T18:31:22.462Z","avatar_url":"https://github.com/akalongman.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Longish code style configuration\n================================\n\nThis is a [PSR-12](http://www.php-fig.org/psr/psr-12/) based code style ruleset for [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)\n\nPHP Code Sniffer\n----------------\n\nConfiguration file: *longish.phpcs.xml*\n\n### Usage\n\n1. Link longman/php-code-style repo as composer dependency\n\n    `$ composer require --dev longman/php-code-style`\n\n2. Extend provided configuration to adapt it to your project. \nFor example, create custom `phpcs.xml` file and put: \n   \n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cruleset name=\"Project code style checker config\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"../vendor/squizlabs/php_codesniffer/phpcs.xsd\"\u003e\n    \u003crule ref=\"./vendor/longman/php-code-style/longish.phpcs.xml\"/\u003e\n    \n    \u003c!-- Exclude stubs file for PSR1.Classes.ClassDeclaration rule --\u003e\n    \u003crule ref=\"PSR1.Classes.ClassDeclaration\"\u003e\n        \u003cexclude-pattern\u003e*/_stubs.php\u003c/exclude-pattern\u003e\n    \u003c/rule\u003e\n    \n    \u003c!-- Exclude stubs file for Generic.CodeAnalysis.UnconditionalIfStatement rule --\u003e\n    \u003crule ref=\"Generic.CodeAnalysis.UnconditionalIfStatement.Found\"\u003e\n        \u003cexclude-pattern\u003e*/_stubs.php\u003c/exclude-pattern\u003e\n    \u003c/rule\u003e\n\u003c/ruleset\u003e\n```\n\n3. For Laravel you can directly include `laravel.phpcs.xml`:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cruleset name=\"Project code style checker config\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"../vendor/squizlabs/php_codesniffer/phpcs.xsd\"\u003e\n    \u003crule ref=\"./vendor/longman/php-code-style/laravel.phpcs.xml\" /\u003e\n\n\u003c/ruleset\u003e\n```\n\nRunning check (Laravel example):\n\n    vendor/bin/phpcs --standard=vendor/longman/php-code-style/laravel.phpcs.xml -spn --encoding=utf-8 --report-width=150 --colors --parallel=16 app/ config/ tests/\n\nRunning check with custom phpcs.xml:\n\n    vendor/bin/phpcs --standard=phpcs.xml -spn --encoding=utf-8 --report-width=150 --colors --parallel=16 app/ config/ tests/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakalongman%2Fphp-code-style","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakalongman%2Fphp-code-style","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakalongman%2Fphp-code-style/lists"}