Code Duplication    Length = 8-8 lines in 3 locations

src/reflection.php 3 locations

@@ 168-175 (lines=8) @@
165
                    }
166
                }
167
            }
168
            if ($tokens[$i][0] === T_CLASS) {
169
                for ($j = $i + 1; $j < $iMax; $j++) {
170
                    if ($tokens[$j] === '{') {
171
                        $class = $tokens[$i + 2][1];
172
                        $classes[] = $class;
173
                    }
174
                }
175
            }
176
            if ($tokens[$i][0] === T_INTERFACE) {
177
                for ($j = $i + 1; $j < $iMax; $j++) {
178
                    if ($tokens[$j] === '{') {
@@ 176-183 (lines=8) @@
173
                    }
174
                }
175
            }
176
            if ($tokens[$i][0] === T_INTERFACE) {
177
                for ($j = $i + 1; $j < $iMax; $j++) {
178
                    if ($tokens[$j] === '{') {
179
                        $interface = $tokens[$i + 2][1];
180
                        $interfaces[] = $interface;
181
                    }
182
                }
183
            }
184
            if ($tokens[$i][0] === T_TRAIT) {
185
                for ($j = $i + 1; $j < $iMax; $j++) {
186
                    if ($tokens[$j] === '{') {
@@ 184-191 (lines=8) @@
181
                    }
182
                }
183
            }
184
            if ($tokens[$i][0] === T_TRAIT) {
185
                for ($j = $i + 1; $j < $iMax; $j++) {
186
                    if ($tokens[$j] === '{') {
187
                        $trait = $tokens[$i + 2][1];
188
                        $traits[] = $trait;
189
                    }
190
                }
191
            }
192
        }
193
    }
194
    return compact('namespace', 'classes', 'traits', 'interfaces');