-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squiz/FunctionDeclarationArgumentSpacing: add parse error/live coding…
… tests
- Loading branch information
Showing
5 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.2.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
// Intentional parse error/live coding. | ||
// Ensuring that the sniff ignores unfinished function declarations (missing open parenthesis). | ||
// This must be the only test in this file. | ||
function |
6 changes: 6 additions & 0 deletions
6
src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.3.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
// Intentional parse error/live coding. | ||
// Ensuring that the sniff ignores unfinished function declarations (missing close parenthesis). | ||
// This must be the only test in this file. | ||
$closure = function (string $paramA, int &...$paramB, |
6 changes: 6 additions & 0 deletions
6
src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.4.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
// Intentional parse error/live coding. | ||
// Ensuring that the sniff ignores unfinished function declarations (missing open parenthesis for import use). | ||
// This must be the only test in this file. | ||
$closure = function (string $param) use |
6 changes: 6 additions & 0 deletions
6
src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.5.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
// Intentional parse error/live coding. | ||
// Ensuring that the sniff ignores unfinished function declarations (missing close parenthesis for import use). | ||
// This must be the only test in this file. | ||
$closure = function (string $param) use ($var |
6 changes: 6 additions & 0 deletions
6
src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.6.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
|
||
// Intentional parse error/live coding. | ||
// Ensuring that the sniff ignores unfinished function declarations (missing close parenthesis). | ||
// This must be the only test in this file. | ||
$arrow = static fn (string $paramA |