{"id":26452134,"url":"https://github.com/sunray/coding-standard","last_synced_at":"2026-04-05T21:05:27.577Z","repository":{"id":57061751,"uuid":"108319838","full_name":"sunray/coding-standard","owner":"sunray","description":"The Sunray development coding standard","archived":false,"fork":false,"pushed_at":"2019-03-07T20:59:13.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T21:28:13.933Z","etag":null,"topics":["coding-standards","coding-style","eslint","javascript","php","php-codesniffer","php7","prettier"],"latest_commit_sha":null,"homepage":null,"language":null,"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/sunray.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":"2017-10-25T20:03:13.000Z","updated_at":"2019-03-07T20:59:15.000Z","dependencies_parsed_at":"2022-08-24T07:30:16.762Z","dependency_job_id":null,"html_url":"https://github.com/sunray/coding-standard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunray%2Fcoding-standard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunray%2Fcoding-standard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunray%2Fcoding-standard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunray%2Fcoding-standard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunray","download_url":"https://codeload.github.com/sunray/coding-standard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244267808,"owners_count":20425899,"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-standards","coding-style","eslint","javascript","php","php-codesniffer","php7","prettier"],"created_at":"2025-03-18T17:26:27.861Z","updated_at":"2025-12-30T22:48:10.630Z","avatar_url":"https://github.com/sunray.png","language":null,"readme":"# Sunray Coding Standard\n\n[![Downloads](https://img.shields.io/packagist/dt/sunray/coding-standard.svg?style=flat-square)](https://packagist.org/packages/sunray/coding-standard)\n[![License](https://img.shields.io/github/license/sunray/coding-standard.svg?style=flat-square)](https://github.com/sunray/coding-standard/blob/master/LICENSE)\n\nA coding standard to use for common PHP and JavaScript modules.\n\nThe main objectives of this standard are outlined in the \n[Sunray Coding Philosophy](coding-philosophy.md) which\naims to create an efficient development workflow resulting from readable, debuggable, and \nmaintainable code. The general principles are:\n* [Consistency](coding-philosophy.md#consistency)\n* [Strict and Predictable Code](coding-philosophy.md#strict-and-predictable-code)\n* [Minimize The Impact of Change](coding-philosophy.md#minimize-the-impact-of-change)\n* [Optimize for Readability](coding-philosophy.md#optimize-for-readability)\n* [Optimize for Code Completion](coding-philosophy.md#optimize-for-code-completion)\n\n\n## PHP\n\n\u003e **The PHP specific coding standards are outlined in a \n\u003e [separate document](coding-standard-php.md).**\n\n#### Requirements\n* PHP 7.1+\n* Composer\n\n#### Installation\n1. Add `\"sunray/coding-standard\": \"dev-master\"` to the `require-dev` block in your application's\n   `composer.json` as follows:\n    ```json\n    {\n        \"require-dev\": {\n            \"sunray/coding-standard\": \"dev-master\"\n        }\n    }\n    ```\n    or automatically:\n    ```bash\n    composer require --dev sunray/coding-standard:dev-master\n    ```\n   \n#### Usage\n1. Create a `phpcs.xml` file in the root of your application as follows:\n    ```xml\n    \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n    \u003c!DOCTYPE xml\u003e\n    \u003cruleset name=\"ProjectName\"\u003e\n        \u003c!-- Configure Project Paths --\u003e\n\n        \u003c!-- PHPCS Settings --\u003e\n        \u003carg value=\"p\" /\u003e\n        \u003carg value=\"s\" /\u003e\n        \u003carg name=\"basepath\" value=\".\" /\u003e\n        \u003carg name=\"colors\" /\u003e\n        \u003carg name=\"cache\" /\u003e\n        \u003carg name=\"extensions\" value=\"php\" /\u003e\n        \u003carg name=\"encoding\" value=\"utf-8\"/\u003e\n        \u003carg name=\"report-width\" value=\"80\" /\u003e\n    \n        \u003c!-- Include the Sunray coding standard --\u003e\n        \u003crule ref=\"vendor/sunray/coding-standard/ruleset.xml\" /\u003e\n    \u003c/ruleset\u003e\n    ```\n2. From your application root execute the following:\n    ```bash\n    vendor/bin/phpcs\n    ```\n\n## JavaScript","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunray%2Fcoding-standard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunray%2Fcoding-standard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunray%2Fcoding-standard/lists"}