Skip to content

Commit 5ca8737

Browse files
committed
Chore: Add test to ensure strict param is used on functions
1 parent 7240b33 commit 5ca8737

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: tests/Integration/Fixtures/Basic.correct.php.inc

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class Basic
1414
$lambdaWithUnusedImport = function () { return 'foo'; };
1515
// NoUselessSprintfFixer
1616
$uselessSprintf = 'bar';
17+
// StrictParamFixer
18+
$useStrictParam = in_array(1337, $fooBar, true);
1719
// SingleSpaceAfterConstructFixer, StrictComparisonFixer
1820
if ($a === $b || $bazLength !== 3) {
1921
return true;

Diff for: tests/Integration/Fixtures/Basic.wrong.php.inc

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class Basic
1313
$lambdaWithUnusedImport = function () use ($fooBar) { return 'foo'; };
1414
// NoUselessSprintfFixer
1515
$uselessSprintf = sprintf('bar');
16+
// StrictParamFixer
17+
$useStrictParam = in_array(1337, $fooBar);
1618
// SingleSpaceAfterConstructFixer, StrictComparisonFixer
1719
if ($a == $b || $bazLength != 3) { return true; }
1820
return false; // BlankLineBeforeStatementFixer

0 commit comments

Comments
 (0)