| @@ 59-65 (lines=7) @@ | ||
| 56 | ||
| 57 | // Ignore default value assignments in function definitions. |
|
| 58 | $function = $phpcsFile->findPrevious(T_FUNCTION, ($stackPtr - 1), null, false, null, true); |
|
| 59 | if ($function !== false) { |
|
| 60 | $opener = $tokens[$function]['parenthesis_opener']; |
|
| 61 | $closer = $tokens[$function]['parenthesis_closer']; |
|
| 62 | if ($opener < $stackPtr && $closer > $stackPtr) { |
|
| 63 | return; |
|
| 64 | } |
|
| 65 | } |
|
| 66 | ||
| 67 | // Ignore values in array definitions. |
|
| 68 | $array = $phpcsFile->findNext( |
|
| @@ 62-68 (lines=7) @@ | ||
| 59 | ||
| 60 | // Ignore default value assignments in function definitions. |
|
| 61 | $function = $phpcsFile->findPrevious(array(T_FUNCTION, T_CLOSURE), ($stackPtr - 1), null, false, null, true); |
|
| 62 | if ($function !== false) { |
|
| 63 | $opener = $tokens[$function]['parenthesis_opener']; |
|
| 64 | $closer = $tokens[$function]['parenthesis_closer']; |
|
| 65 | if ($opener < $stackPtr && $closer > $stackPtr) { |
|
| 66 | return; |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| 70 | /* |
|
| 71 | The general rule is: |
|