Skip to content

Commit

Permalink
README - add info about UnusedPublicMethodSniff configuratoin [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Mar 16, 2019
1 parent 15e89d4 commit 444a1af
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Expand Up @@ -1086,8 +1086,8 @@ trait SomeTrait

### Possible Unused Public Method

- :wrench:
- class: [`Symplify\CodingStandard\Sniffs\DeadCode\UnusedPublicMethodSniff`](src/Sniffs/DeadCode/UnusedPublicMethodSniff.php)

- **Requires ECS due *double run* feature**, use with `--clear-cache` so all files are included.

:x:
Expand Down Expand Up @@ -1126,6 +1126,17 @@ $someObject = new SomeClass;
$someObject->usedMethod();
```

Do you have public methods used only byr 3rd party? **Just skip them**:

```yaml
# ecs.yaml
services:
Symplify\CodingStandard\Sniffs\DeadCode\UnusedPublicMethodSniff:
allow_classes:
- 'Symplify\Autodiscovery\Discovery'
- 'Symplify\FlexLoader\Flex\FlexLoader'
```

## Contributing

Open an [issue](https://github.com/Symplify/Symplify/issues) or send a [pull-request](https://github.com/Symplify/Symplify/pulls) to main repository.

0 comments on commit 444a1af

Please sign in to comment.