{"id":20128037,"url":"https://github.com/camelotproject/coding-style","last_synced_at":"2025-07-20T05:33:00.026Z","repository":{"id":48340440,"uuid":"145538439","full_name":"CamelotProject/coding-style","owner":"CamelotProject","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-29T15:19:27.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T13:24:50.180Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/CamelotProject.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":"2018-08-21T09:12:58.000Z","updated_at":"2021-11-08T12:22:18.000Z","dependencies_parsed_at":"2024-11-13T20:29:50.840Z","dependency_job_id":"f1ee47c9-bb97-462e-b935-aa0b8c8d20dc","html_url":"https://github.com/CamelotProject/coding-style","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":"0.19047619047619047","last_synced_commit":"1c57e46502da8422761e2d208a15e6b8c3fe235f"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/CamelotProject/coding-style","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamelotProject%2Fcoding-style","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamelotProject%2Fcoding-style/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamelotProject%2Fcoding-style/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamelotProject%2Fcoding-style/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CamelotProject","download_url":"https://codeload.github.com/CamelotProject/coding-style/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CamelotProject%2Fcoding-style/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266071519,"owners_count":23871940,"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-13T20:25:08.494Z","updated_at":"2025-07-20T05:33:00.008Z","avatar_url":"https://github.com/CamelotProject.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Camelot coding style standard\n=============================\n\nPHP\n---\n\n[Camelot](https://github.com/CamelotProject) tries to adhere a coding style based on PSR-2\nand the Symfony2 coding standard.\n\n### [CodeSniffer][phpcs]\n\nTo use run:\n```\ncomposer require camleot/codingstyle --dev\n```\nAdd a `global` before `require` if you want to install it globally.\n\nIf installing globally you also need to configure the `installed_paths`:\n```\nphpcs --config-set installed_paths \"$(composer config --global data-dir)\"\n```\n\nThen create a CodeSniffer config file named `phpcs.xml.dist` in your project root:\n```xml\n\u003c?xml version=\"1.0\"?\u003e\n\u003cruleset\u003e\n    \u003c!-- Add color to output...umm duh --\u003e\n    \u003carg name=\"colors\"/\u003e\n\n    \u003c!-- Files or folders to sniff --\u003e\n    \u003cfile\u003esrc\u003c/file\u003e\n    \u003cfile\u003etests\u003c/file\u003e\n\n    \u003c!-- Path to our coding standard folder --\u003e\n    \u003crule ref=\"vendor/camelot/codingstyle/Camelot\"/\u003e\n\u003c/ruleset\u003e\n```\nAdditional changes can be made here. See [CodeSniffer's annotated ruleset][phpcs_ruleset] for more information.\n\n`phpcs.xml.dist` should be committed for all developers to use.  \nAn `phpcs.xml` file can also be create which takes precedence over `phpcs.xml.dist` for local\nchanges. This file should be ignored from git.\n\n\n### [Code Fixer][code_fixer]\n\nTo use run:\n```bash\ncomposer require camelot/codingstyle --dev\n```\nAdd a `global` before `require` if you want to install it globally.\n\nThen create a config file named `.php_cs.dist` in your project root:\n```php\n\u003c?php\n\nreturn Camelot\\CsFixer\\Config::create()\n    // addRules() accepts arrays and traversable objects.\n    -\u003eaddRules(\n        // Create Camelot's standard rules.\n        Camelot\\CsFixer\\Rules::create()\n            // Enable risky rules.\n            -\u003erisky()\n            // Enable PHP 5.6, 7.0, and 7.1 rules. Methods exist for each version.\n            //-\u003ephp71()\n    )\n\n    // Modify existing rules or add new ones.\n    -\u003eaddRules([\n        'heredoc_to_nowdoc' =\u003e false,\n        'mb_str_functions'  =\u003e true,\n    ])\n\n    // Add directories to scan.\n    -\u003ein('src', 'tests')\n;\n```\nSee their [website][code_fixer] for a list of rules and additional configuration options.\n\n`.php_cs.dist` should be committed for all developers to use.  \nAn `.php_cs` file can also be create which takes precedence over `.php_cs.dist` for local\nchanges. This file should be ignored from git. \n\nJavaScript\n----------\n\nThere's no explicitly written style yet, but when creating the files needed for\nCamelot using the grunt toolchain there's a target linting the javascript code.\n\n[phpcs]: http://pear.php.net/package/PHP_CodeSniffer\n[phpcs_ruleset]: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml\n[code_fixer]: http://cs.sensiolabs.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamelotproject%2Fcoding-style","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamelotproject%2Fcoding-style","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamelotproject%2Fcoding-style/lists"}