{"id":18829784,"url":"https://github.com/froiden/phpstandard","last_synced_at":"2025-04-14T03:40:56.378Z","repository":{"id":48563140,"uuid":"62278277","full_name":"Froiden/PHPStandard","owner":"Froiden","description":"PHP Coding standard to be followed at Froiden","archived":false,"fork":false,"pushed_at":"2024-06-06T07:45:43.000Z","size":42,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T01:48:27.075Z","etag":null,"topics":[],"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/Froiden.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}},"created_at":"2016-06-30T04:04:47.000Z","updated_at":"2024-06-06T07:45:08.000Z","dependencies_parsed_at":"2022-09-12T23:23:14.200Z","dependency_job_id":null,"html_url":"https://github.com/Froiden/PHPStandard","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Froiden%2FPHPStandard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Froiden%2FPHPStandard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Froiden%2FPHPStandard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Froiden%2FPHPStandard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Froiden","download_url":"https://codeload.github.com/Froiden/PHPStandard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248818525,"owners_count":21166438,"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-11-08T01:46:20.821Z","updated_at":"2025-04-14T03:40:56.353Z","avatar_url":"https://github.com/Froiden.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Coding Standard\nThis repository contains rulesets for **PHP CodeSniffer** and **PHP Mess Detector** along with some custom rules. These standards are followed internally at *Froiden* (www.froiden.com)\n\n## Installation\nInstall this repository globally using composer:\n\n\tcomposer global require froiden/php_standard\n\nAlways use the latest version of the repository.\n\n## Setup\nThe project will be installed in global composer folder on your PC. \n* **Mac**: `.composer/vendor` folder in your home directory\n* **Windows**: `AppData/Roaming/Composer/vendor` folder in your user directory\n* **Ubuntu**: `.config/composer/vendor` folder in your home directory\n\nYou follow the steps respective to your favourite IDE to configure PHP CodeSniffer and PHP MessDetector and point to the two rulesets in the installation folder.\n* **ruleset.xml** - For CodeSniffer\n* **rulesetmd.xml** - For MessDetector\n\n## Attribution\nSome sniffs in this repository have been derived from original PHP_CodeSniffer project. Credits for those go to the respective developers.\n\n## VS Code SETUP\nInstall the extension name **PHP Sniffer** by **wongjn**\n\n![N|Solid](https://public.froid.works/php-snif.png)\nAfter Activation add the below file to settings.json file\n\nFor Mac\n\n\t\"phpSniffer.standard\": \"~/.composer/vendor/froiden/php_standard/ruleset.xml\",\n\nFor Linux\n\n\t\"phpSniffer.standard\": \"~/.config/composer/vendor/froiden/php_standard/ruleset.xml\",\n\nFor Windows\n\n\t\"phpSniffer.standard\": \"%userprofile%/AppData/Roaming/Composer/vendor/froiden/php_standard/ruleset.xml\",\n\n\n  ![N|Solid](https://public.froid.works/vs-settings-1.png) \n\n\n\n\nTo check \n\n\tphpcs --standard=\u003cPATH_OF_RULESET\u003e \u003cSPACE\u003e \u003cPATH_OF_FILEs_CHECK\u003e\n\nTO fix\n\n\tphpcbf --standard=\u003cPATH_OF_RULESET\u003e \u003cSPACE\u003e \u003cPATH_OF_FILEs_CHECK\u003e\n\n\nIgnoring a file\n\n\t// @codingStandardsIgnoreFile\n\n\t// phpcs:ignoreFile\n\nIgnoring a line\n\n\t// @codingStandardsIgnoreLine\n\n\t// phpcs:ignore\n\nIgnoring a block\n\n\n\t// @codingStandardsIgnoreStart\n\n\t// phpcs:disable\n\n\t// @codingStandardsIgnoreEnd\n\n\t// phpcs:enable\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroiden%2Fphpstandard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffroiden%2Fphpstandard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroiden%2Fphpstandard/lists"}