Skip to content

Commit c55cfa5

Browse files
committed
enable formatting in tests/
1 parent 71cb3dc commit c55cfa5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

phpcs.xml.dist

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111

1212
<!-- Paths to check -->
1313
<file>src</file>
14+
<file>tests</file>
15+
<exclude-pattern>tests/**/data</exclude-pattern>
1416

1517
<rule ref="Generic.Files.LineLength">
1618
<properties>
1719
<property name="lineLimit" value="300"/>
1820
<property name="absoluteLineLimit" value="500"/>
1921
</properties>
2022
</rule>
21-
</ruleset>
23+
</ruleset>

src/Rules/UseSafeFunctionsRule.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,13 @@ public function processNode(Node $node, Scope $scope): array
3333
$unsafeFunctions = FunctionListLoader::getFunctionList();
3434

3535
if (isset($unsafeFunctions[$functionName])) {
36-
if (
37-
$functionName === "json_decode"
36+
if ($functionName === "json_decode"
3837
&& $this->argValueIncludeJSONTHROWONERROR($node->getArgs()[3] ?? null)
3938
) {
4039
return [];
4140
}
4241

43-
if (
44-
$functionName === "json_encode"
42+
if ($functionName === "json_encode"
4543
&& $this->argValueIncludeJSONTHROWONERROR($node->getArgs()[1] ?? null)
4644
) {
4745
return [];

0 commit comments

Comments
 (0)