Skip to content

Commit e9b9777

Browse files
rodrigoprimojrfnl
authored andcommitted
Generic/FunctionCallArgumentSpacing: improve code coverage
1 parent 7e550f4 commit e9b9777

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.1.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,8 @@ $foo = new MyClass(
172172
$obj,
173173
'getMethod',
174174
);
175+
176+
#[AttributeName(1, 2)]
177+
#[AttributeName(1,2)]
178+
179+
$callable = myCallable(...);

src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.1.inc.fixed

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,8 @@ $foo = new MyClass(
172172
$obj,
173173
'getMethod',
174174
);
175+
176+
#[AttributeName(1, 2)]
177+
#[AttributeName(1, 2)]
178+
179+
$callable = myCallable(...);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
// Intentional parse error (missing closing parenthesis).
4+
// This should be the only test in this file.
5+
// Testing that the sniff is *not* triggered.
6+
7+
myFunction(

src/Standards/Generic/Tests/Functions/FunctionCallArgumentSpacingUnitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function getErrorList($testFile='')
6565
155 => 1,
6666
162 => 2,
6767
170 => 1,
68+
177 => 1,
6869
];
6970

7071
default:

0 commit comments

Comments
 (0)