https://github.com/sunray/coding-standard
The Sunray development coding standard
https://github.com/sunray/coding-standard
coding-standards coding-style eslint javascript php php-codesniffer php7 prettier
Last synced: 3 months ago
JSON representation
The Sunray development coding standard
- Host: GitHub
- URL: https://github.com/sunray/coding-standard
- Owner: sunray
- License: mit
- Created: 2017-10-25T20:03:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-07T20:59:13.000Z (over 6 years ago)
- Last Synced: 2024-11-15T21:28:13.933Z (8 months ago)
- Topics: coding-standards, coding-style, eslint, javascript, php, php-codesniffer, php7, prettier
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sunray Coding Standard
[](https://packagist.org/packages/sunray/coding-standard)
[](https://github.com/sunray/coding-standard/blob/master/LICENSE)A coding standard to use for common PHP and JavaScript modules.
The main objectives of this standard are outlined in the
[Sunray Coding Philosophy](coding-philosophy.md) which
aims to create an efficient development workflow resulting from readable, debuggable, and
maintainable code. The general principles are:
* [Consistency](coding-philosophy.md#consistency)
* [Strict and Predictable Code](coding-philosophy.md#strict-and-predictable-code)
* [Minimize The Impact of Change](coding-philosophy.md#minimize-the-impact-of-change)
* [Optimize for Readability](coding-philosophy.md#optimize-for-readability)
* [Optimize for Code Completion](coding-philosophy.md#optimize-for-code-completion)## PHP
> **The PHP specific coding standards are outlined in a
> [separate document](coding-standard-php.md).**#### Requirements
* PHP 7.1+
* Composer#### Installation
1. Add `"sunray/coding-standard": "dev-master"` to the `require-dev` block in your application's
`composer.json` as follows:
```json
{
"require-dev": {
"sunray/coding-standard": "dev-master"
}
}
```
or automatically:
```bash
composer require --dev sunray/coding-standard:dev-master
```
#### Usage
1. Create a `phpcs.xml` file in the root of your application as follows:
```xml
```
2. From your application root execute the following:
```bash
vendor/bin/phpcs
```## JavaScript