Code Duplication    Length = 10-11 lines in 2 locations

src/Fixer.php 2 locations

@@ 74-83 (lines=10) @@
71
        return implode($this->tokens);
72
    }
73
74
    public function getTokenContent(int $stackPtr) : string
75
    {
76
        if ($this->inChangeset === true
77
            && isset($this->changeset[$stackPtr]) === true
78
        ) {
79
            return $this->changeset[$stackPtr];
80
        } else {
81
            return $this->tokens[$stackPtr];
82
        }
83
    }
84
85
    public function beginChangeset()
86
    {
@@ 152-162 (lines=11) @@
149
    /**
150
     * @return bool If a change was reverted.
151
     */
152
    public function revertToken(int $stackPtr) : bool
153
    {
154
        if (isset($this->fixedTokens[$stackPtr]) === false) {
155
            return false;
156
        }
157
158
        $this->tokens[$stackPtr] = $this->fixedTokens[$stackPtr];
159
        unset($this->fixedTokens[$stackPtr]);
160
161
        return true;
162
    }
163
164
    public function substrToken(int $stackPtr, int $start, int $length = null) : bool
165
    {