Skip to content

Commit 9e30249

Browse files
committed
Ensure safe PHP
1 parent 8f95a34 commit 9e30249

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
includes:
2+
- vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
13
parameters:
24
level: max
35
paths:

tests/MixedScalarTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,12 @@ protected function executeQueryWithJsonVariable(string $jsonLiteral): ExecutionR
185185
}
186186
';
187187

188-
$json = json_decode(
189-
/** @lang JSON */
190-
"
188+
$json = \Safe\json_decode(/** @lang JSON */ <<<JSON
191189
{
192-
\"var\": $jsonLiteral
190+
"var": $jsonLiteral
193191
}
194-
",
192+
JSON
193+
,
195194
true
196195
);
197196

0 commit comments

Comments
 (0)