Skip to content

Commit

Permalink
Update phpcs-config readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Gandhi11 committed Oct 29, 2019
1 parent 0b741d1 commit 7a09e94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ A collection of shareable configurations for various coding-style tools to make

## Setup

1. `composer require --dev exolnet/code-quality-tools`
1. `composer require --dev exolnet/phpcs-config`
2. Run the following command to run the standards checks:

```
vendor/bin/phpcs --standard=vendor/exolnet/code-quality-tools .
vendor/bin/phpcs --standard=vendor/exolnet/phpcs-config .
```

You can add this to your Travis YAML file as a test:

```yaml
script:
- phpunit
- vendor/bin/phpcs --standard=vendor/exolnet/code-quality-tools .
- vendor/bin/phpcs --standard=vendor/exolnet/phpcs-config .
```
### Excluding Files
Expand Down Expand Up @@ -56,7 +56,7 @@ If you want to add further rules (such as laravel-specific rules), you can creat
<file>tests</file>
<!-- Use eXolnet Coding Standards -->
<rule ref="vendor/exolnet/code-quality-tools/ruleset.xml" />
<rule ref="vendor/exolnet/phpcs-config" />
<!-- Add Laravel-specific rules -->
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
Expand All @@ -77,7 +77,7 @@ vendor/bin/phpcs --standard=ruleset.xml .
You can also customise the rule to exclude elements if they aren't applicable to the project:

```xml
<rule ref="vendor/exolnet/code-quality-tools/ruleset.xml">
<rule ref="vendor/exolnet/phpcs-config">
<!-- Disable short array syntax -->
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" />
</rule>
Expand Down

0 comments on commit 7a09e94

Please sign in to comment.