Skip to content

Commit

Permalink
Squiz/FunctionDeclarationArgumentSpacing: add test for the `NoSpaceBe…
Browse files Browse the repository at this point in the history
…foreHint` error

... which was so far not covered by tests.
  • Loading branch information
jrfnl committed Jan 11, 2025
1 parent 3c2f8d1 commit 07b5e34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 100,7 @@ function functionName( ?string $arg1 = 'foo' , ?int & $arg2 , $arg3 ) {}
function functionName(string $arg1, ... $arg2) {}
function functionName(string $arg1, int ... $arg2) {}
function functionName(string $arg1, & ... $arg2) {}

function functionName(string $arg1,int $arg2) {}

$a = function ($var1, $var2=false) use (
$longVar1, & $longerVar1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 100,7 @@ function functionName(?string $arg1='foo', ?int &$arg2, $arg3) {}
function functionName(string $arg1, ...$arg2) {}
function functionName(string $arg1, int ...$arg2) {}
function functionName(string $arg1, &...$arg2) {}

function functionName(string $arg1, int $arg2) {}

$a = function ($var1, $var2=false) use (
$longVar1, &$longerVar1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 69,7 @@ public function getErrorList($testFile='')
100 => 2,
101 => 2,
102 => 2,
103 => 1,
106 => 1,
107 => 2,
111 => 3,
Expand Down

0 comments on commit 07b5e34

Please sign in to comment.