Fix sniff issues, exclude 'cases' test files from codesniff
parent
68656d9663
commit
4ade5fdbb2
|
@ -2,6 +2,7 @@
|
||||||
<ruleset name="PHP Language Server">
|
<ruleset name="PHP Language Server">
|
||||||
<file>src</file>
|
<file>src</file>
|
||||||
<file>tests</file>
|
<file>tests</file>
|
||||||
|
<exclude-pattern>tests/Validation/cases</exclude-pattern>
|
||||||
<rule ref="PSR2">
|
<rule ref="PSR2">
|
||||||
<exclude name="PSR2.Namespaces.UseDeclaration.MultipleDeclarations"/>
|
<exclude name="PSR2.Namespaces.UseDeclaration.MultipleDeclarations"/>
|
||||||
<exclude name="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed"/>
|
<exclude name="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed"/>
|
||||||
|
|
|
@ -121,4 +121,4 @@ function isConstDefineExpression(Node $node): bool
|
||||||
&& isset($node->argumentExpressionList->children[0])
|
&& isset($node->argumentExpressionList->children[0])
|
||||||
&& $node->argumentExpressionList->children[0]->expression instanceof Node\StringLiteral
|
&& $node->argumentExpressionList->children[0]->expression instanceof Node\StringLiteral
|
||||||
&& isset($node->argumentExpressionList->children[2]);
|
&& isset($node->argumentExpressionList->children[2]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,8 +43,8 @@ class ValidationTest extends TestCase
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This test loads the test cases specified in .php files under cases/ and looks at the whole set of
|
* This test loads the test cases specified in .php files under cases/ and looks at the whole set of
|
||||||
* Definitions and References produced. It reads the expected results from associated .json files
|
* Definitions and References produced. It reads the expected results from associated .json files
|
||||||
* and compares to the actual result. If they don't match, the test fails and it writes the new baseline
|
* and compares to the actual result. If they don't match, the test fails and it writes the new baseline
|
||||||
* to the .json file.
|
* to the .json file.
|
||||||
* @group validation
|
* @group validation
|
||||||
|
|
Loading…
Reference in New Issue