Skip to content

Commit

Permalink
Use CS annotation instead of config exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
tux-rampage committed Sep 11, 2018
1 parent 2385fe7 commit 7e3d315
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 0 additions & 11 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
<ruleset name="Zend Framework Coding Standard">
<rule ref="./vendor/zendframework/zend-coding-standard/ruleset.xml"/>

<!--
Don't make it bail at the file level deprecation of AbstactInjection (Intented side effect).
The inline ignores phpcs:disable or @codingStandardsIgnoreStart (as documented on
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-filework)
do NOT work, phpcs still errors. This is the only way to fix it.
-->
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<exclude-pattern>src/Resolver/AbstractInjection.php</exclude-pattern>
</rule>

<!-- Paths to check -->
<file>src</file>
<file>test</file>
Expand Down
2 changes: 2 additions & 0 deletions src/Resolver/AbstractInjection.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use const E_USER_DEPRECATED;
use function trigger_error;

// @codingStandardIgnoreStart
trigger_error(
sprintf(
'%s is deprecated, please migrate to %s',
Expand All @@ -18,6 +19,7 @@
),
E_USER_DEPRECATED
);
// @codingStandardIgnoreEnd

/**
* @codeCoverageIgnore Deprecated
Expand Down

0 comments on commit 7e3d315

Please sign in to comment.