| @@ 316-329 (lines=14) @@ | ||
| 313 | if ($inString === '' && $inComment === '' && $buffer !== '') { |
|
| 314 | // If the buffer only has whitespace and we are about to |
|
| 315 | // add a character, store the whitespace first. |
|
| 316 | if (trim($char) !== '' && trim($buffer) === '') { |
|
| 317 | $tokens[] = array( |
|
| 318 | 'code' => T_WHITESPACE, |
|
| 319 | 'type' => 'T_WHITESPACE', |
|
| 320 | 'content' => str_replace("\n", $eolChar, $buffer), |
|
| 321 | ); |
|
| 322 | ||
| 323 | if (PHP_CODESNIFFER_VERBOSITY > 1) { |
|
| 324 | $content = PHP_CodeSniffer::prepareForOutput($buffer); |
|
| 325 | echo "\t=> Added token T_WHITESPACE ($content)".PHP_EOL; |
|
| 326 | } |
|
| 327 | ||
| 328 | $buffer = ''; |
|
| 329 | } |
|
| 330 | ||
| 331 | // If the buffer is not whitespace and we are about to |
|
| 332 | // add a whitespace character, store the content first. |
|
| @@ 669-682 (lines=14) @@ | ||
| 666 | } |
|
| 667 | } |
|
| 668 | ||
| 669 | if ($inComment === '' && $cleanBuffer === false) { |
|
| 670 | $tokens[] = array( |
|
| 671 | 'code' => T_STRING, |
|
| 672 | 'type' => 'T_STRING', |
|
| 673 | 'content' => str_replace("\n", $eolChar, $buffer), |
|
| 674 | ); |
|
| 675 | ||
| 676 | if (PHP_CODESNIFFER_VERBOSITY > 1) { |
|
| 677 | $content = PHP_CodeSniffer::prepareForOutput($buffer); |
|
| 678 | echo "\t=> Added token T_STRING ($content)".PHP_EOL; |
|
| 679 | } |
|
| 680 | ||
| 681 | $buffer = ''; |
|
| 682 | } |
|
| 683 | }//end if |
|
| 684 | ||
| 685 | if ($cleanBuffer === true) { |
|