vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MySource/Sniffs/Objects/CreateWidgetTypeCallbackSniff.php 1 location
|
@@ 109-115 (lines=7) @@
|
| 106 |
|
$nestedFunction = null; |
| 107 |
|
continue; |
| 108 |
|
} |
| 109 |
|
} else if (($tokens[$i]['code'] === T_FUNCTION |
| 110 |
|
|| $tokens[$i]['code'] === T_CLOSURE) |
| 111 |
|
&& isset($tokens[$i]['scope_closer']) === true |
| 112 |
|
) { |
| 113 |
|
$nestedFunction = $tokens[$i]['scope_closer']; |
| 114 |
|
continue; |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
if ($nestedFunction === null && $tokens[$i]['code'] === T_RETURN) { |
| 118 |
|
// Make sure return statements are not returning anything. |
vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php 1 location
|
@@ 249-255 (lines=7) @@
|
| 246 |
|
|
| 247 |
|
// Skip whole functions and classes/interfaces because they are not |
| 248 |
|
// technically executed code, but rather declarations that may be used. |
| 249 |
|
if ($tokens[$i]['code'] === T_FUNCTION |
| 250 |
|
|| $tokens[$i]['code'] === T_CLASS |
| 251 |
|
|| $tokens[$i]['code'] === T_INTERFACE |
| 252 |
|
) { |
| 253 |
|
$i = $tokens[$i]['scope_closer']; |
| 254 |
|
continue; |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
$line = $tokens[$i]['line']; |
| 258 |
|
if ($line > $lastLine) { |