Commit 7a47e82
Generic/FunctionCallArgumentSpacing: fix code examples in the XML doc
The code examples in the XML documentation of this sniff were incorrect
as the sniff does not check spacing in function argument definitions. It
only checks spacing in function and method calls.
As far as I could check this has always been the case, or at least it
has been the case for a long time. Since tests were added for this
sniff when it was part of the PEAR standard and called
MethodCallArgumentSpacing, it ignored function definitions and checked
only function calls:
squizlabs/PHP_CodeSniffer@7b84951#diff-56e2f69852c3071fbf86d20fbb49f38dae17cff8731154d8b1b7495c4ad8eeb0R24-R27
Here is the sniff code where it ignores function definitions:
https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/57a9ed734e2ab06c062fe0e463745eab483cf722/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php#L55-L661 parent a80fde9 commit 7a47e82
File tree
1 file changed
+2
-6
lines changed- src/Standards/Generic/Docs/Functions
1 file changed
+2
-6
lines changedLines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 15 | + | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
| |||
0 commit comments