@@ 477-497 (lines=21) @@ | ||
474 | return false; |
|
475 | } |
|
476 | ||
477 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
478 | $bt = debug_backtrace(); |
|
479 | if ($bt[1]['class'] === 'Symplify\PHP7_CodeSniffer_Fixer') { |
|
480 | $sniff = $bt[2]['class']; |
|
481 | $line = $bt[1]['line']; |
|
482 | } else { |
|
483 | $sniff = $bt[1]['class']; |
|
484 | $line = $bt[0]['line']; |
|
485 | } |
|
486 | ||
487 | $tokens = $this->currentFile->getTokens(); |
|
488 | $type = $tokens[$stackPtr]['type']; |
|
489 | $oldContent = Common::prepareForOutput($this->_tokens[$stackPtr]); |
|
490 | $newContent = Common::prepareForOutput($content); |
|
491 | if (trim($this->_tokens[$stackPtr]) === '' && isset($this->_tokens[($stackPtr + 1)]) === true) { |
|
492 | // Add some context for whitespace only changes. |
|
493 | $append = Common::prepareForOutput($this->_tokens[($stackPtr + 1)]); |
|
494 | $oldContent .= $append; |
|
495 | $newContent .= $append; |
|
496 | } |
|
497 | }//end if |
|
498 | ||
499 | if ($this->_inChangeset === true) { |
|
500 | $this->_changeset[$stackPtr] = $content; |
|
@@ 586-606 (lines=21) @@ | ||
583 | return false; |
|
584 | } |
|
585 | ||
586 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
587 | $bt = debug_backtrace(); |
|
588 | if ($bt[1]['class'] === 'Symplify\PHP7_CodeSniffer_Fixer') { |
|
589 | $sniff = $bt[2]['class']; |
|
590 | $line = $bt[1]['line']; |
|
591 | } else { |
|
592 | $sniff = $bt[1]['class']; |
|
593 | $line = $bt[0]['line']; |
|
594 | } |
|
595 | ||
596 | $tokens = $this->currentFile->getTokens(); |
|
597 | $type = $tokens[$stackPtr]['type']; |
|
598 | $oldContent = Common::prepareForOutput($this->_tokens[$stackPtr]); |
|
599 | $newContent = Common::prepareForOutput($this->_fixedTokens[$stackPtr]); |
|
600 | if (trim($this->_tokens[$stackPtr]) === '' && isset($tokens[($stackPtr + 1)]) === true) { |
|
601 | // Add some context for whitespace only changes. |
|
602 | $append = Common::prepareForOutput($this->_tokens[($stackPtr + 1)]); |
|
603 | $oldContent .= $append; |
|
604 | $newContent .= $append; |
|
605 | } |
|
606 | }//end if |
|
607 | ||
608 | $this->_tokens[$stackPtr] = $this->_fixedTokens[$stackPtr]; |
|
609 | unset($this->_fixedTokens[$stackPtr]); |