Skip to content

Commit 0fec9ee

Browse files
committed
Squiz/FunctionDeclarationArgumentSpacing: add test for the NoSpaceBeforeHint error
... which was so far not covered by tests.
1 parent d62f08d commit 0fec9ee

3 files changed

+3
-2
lines changed

Diff for: src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.1.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function functionName( ?string $arg1 = 'foo' , ?int & $arg2 , $arg3 ) {}
100100
function functionName(string $arg1, ... $arg2) {}
101101
function functionName(string $arg1, int ... $arg2) {}
102102
function functionName(string $arg1, & ... $arg2) {}
103-
103+
function functionName(string $arg1,int $arg2) {}
104104

105105
$a = function ($var1, $var2=false) use (
106106
$longVar1, & $longerVar1,

Diff for: src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.1.inc.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function functionName(?string $arg1='foo', ?int &$arg2, $arg3) {}
100100
function functionName(string $arg1, ...$arg2) {}
101101
function functionName(string $arg1, int ...$arg2) {}
102102
function functionName(string $arg1, &...$arg2) {}
103-
103+
function functionName(string $arg1, int $arg2) {}
104104

105105
$a = function ($var1, $var2=false) use (
106106
$longVar1, &$longerVar1,

Diff for: src/Standards/Squiz/Tests/Functions/FunctionDeclarationArgumentSpacingUnitTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function getErrorList($testFile='')
6969
100 => 2,
7070
101 => 2,
7171
102 => 2,
72+
103 => 1,
7273
106 => 1,
7374
107 => 2,
7475
111 => 3,

0 commit comments

Comments
 (0)