Compare commits

..

2 Commits

3 changed files with 10 additions and 3 deletions

View File

@ -3,5 +3,8 @@ All notable changes to this package will be documented in this file
## Unreleased
## 1.0.1 - 2022-08-18
- Added exclusion for `SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants` to allow late static binding for constants [patch]
## 1.0.0 - 2022-08-20
- Initial release [major]

View File

@ -3,7 +3,7 @@
[![Latest Version on Packagist](https://img.shields.io/packagist/v/crawl/coding-standard.svg?style=flat-square)](https://packagist.org/packages/crawl/coding-standard)
[![Total Downloads](https://img.shields.io/packagist/dt/crawl/coding-standard.svg?style=flat-square)](https://packagist.org/packages/crawl/coding-standard)
This package provides rule sets for the Crawl Coding Standard.\
This package provides rule sets for the Crawl Coding Standard.
It requires `squizlabs/php_codesniffer` and some extensions (see [composer.json](composer.json)).
## Installation
@ -15,8 +15,9 @@ composer require crawl/coding-standard --dev
```
## Usage
Depending on your project, copy `phpcs-laravel.xml` or `phpcs-package.xml` from `config/` to your project.\
**Note:** don't forget to update `Package\Namespace` when using `phpcs-package.xml`.
Depending on your project, copy `phpcs-laravel.xml` or `phpcs-package.xml` from `config/` to your project.
> **Note:** don't forget to update `Package\Namespace` when using `phpcs-package.xml`.
You can then run PHP Code Sniffer/Beautifier:
```bash

View File

@ -22,6 +22,9 @@
<!-- Disabled since subclasses can't always overrule parents -->
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint"/>
<!-- Disabled to allow late static binding for constants (static::CONST) -->
<exclude name="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants"/>
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
</rule>