Skip to content

Commit

Permalink
Ignore eval CS rule for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzap committed May 24, 2024
1 parent c0fe5bd commit 0331d1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@
<rule ref="WordPress.Security.EscapeOutput">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.PHP.Eval">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
</ruleset>
4 changes: 2 additions & 2 deletions tests/unit/Container/ContainerConfiguratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function testExtensionByTypeNoInfiniteRecursion(): void
class A {}
class B extends A {}
PHP;
eval($php); // phpcs:ignore
eval($php);

$called = [];

Expand Down Expand Up @@ -446,7 +446,7 @@ class C {}
class D {};
class E extends D {};
PHP;
eval($php); // phpcs:ignore
eval($php);

$configurator->addExtension(
'@instanceof<D>',
Expand Down

0 comments on commit 0331d1e

Please sign in to comment.