Code Duplication    Length = 26-26 lines in 2 locations

src/Query/Lexer.php 1 location

@@ 183-208 (lines=26) @@
180
        return $part;
181
    }
182
183
    private function exponentPart()
184
    {
185
        $part = $this->scanner->next();
186
187
        if ($this->scanner->eof()) {
188
            throw $this->getError('Expected a digit but instead reached end');
189
        }
190
191
        $next = $this->scanner->peek();
192
        if ($next === '+' || $next === '-') {
193
            $part .= $this->scanner->next();
194
        }
195
196
        $next = $this->scanner->peek();
197
        if (ctype_digit($next) === false) {
198
            throw $this->getError("Expected a digit but instead found \"{$next}\"");
199
        }
200
201
        $next = $this->scanner->peek();
202
        while ($this->scanner->eof() === false && ctype_digit($next)) {
203
            $part .= $this->scanner->next();
204
            $next = $this->scanner->peek();
205
        }
206
207
        return $part;
208
    }
209
210
    private function number()
211
    {

src/Schema/Lexer.php 1 location

@@ 154-179 (lines=26) @@
151
        return $part;
152
    }
153
154
    private function exponentPart()
155
    {
156
        $part = $this->scanner->next();
157
158
        if ($this->scanner->eof()) {
159
            throw $this->getError('Expected a digit but instead reached end');
160
        }
161
162
        $next = $this->scanner->peek();
163
        if ($next === '+' || $next === '-') {
164
            $part .= $this->scanner->next();
165
        }
166
167
        $next = $this->scanner->peek();
168
        if (ctype_digit($next) === false) {
169
            throw $this->getError("Expected a digit but instead found \"{$next}\"");
170
        }
171
172
        $next = $this->scanner->peek();
173
        while ($this->scanner->eof() === false && ctype_digit($next)) {
174
            $part .= $this->scanner->next();
175
            $next = $this->scanner->peek();
176
        }
177
178
        return $part;
179
    }
180
181
    private function number()
182
    {