Skip to content

Commit 3c2f8d1

Browse files
committed
Squiz/FunctionDeclarationArgumentSpacing: add parse error/live coding tests
1 parent e5f82d7 commit 3c2f8d1

5 files changed

+30
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// Intentional parse error/live coding.
4+
// Ensuring that the sniff ignores unfinished function declarations (missing open parenthesis).
5+
// This must be the only test in this file.
6+
function
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// Intentional parse error/live coding.
4+
// Ensuring that the sniff ignores unfinished function declarations (missing close parenthesis).
5+
// This must be the only test in this file.
6+
$closure = function (string $paramA, int &...$paramB,
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// Intentional parse error/live coding.
4+
// Ensuring that the sniff ignores unfinished function declarations (missing open parenthesis for import use).
5+
// This must be the only test in this file.
6+
$closure = function (string $param) use
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// Intentional parse error/live coding.
4+
// Ensuring that the sniff ignores unfinished function declarations (missing close parenthesis for import use).
5+
// This must be the only test in this file.
6+
$closure = function (string $param) use ($var
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// Intentional parse error/live coding.
4+
// Ensuring that the sniff ignores unfinished function declarations (missing close parenthesis).
5+
// This must be the only test in this file.
6+
$arrow = static fn (string $paramA

0 commit comments

Comments
 (0)