Code Duplication    Length = 12-16 lines in 2 locations

src/AsyncTableGenerator.php 2 locations

@@ 216-227 (lines=12) @@
213
     * @param  Node[]    $ast
214
     * @return Generator
215
     */
216
    protected function extractMethods(array $ast)
217
    {
218
        foreach ($ast as $node) {
219
            if (!isset($node->stmts)) {
220
                continue;
221
            }
222
223
            foreach ($this->iterageStmts($node->stmts) as $stmt) {
224
                yield $stmt;
225
            }
226
        }
227
    }
228
229
    protected function iterageStmts(array $stmts)
230
    {
@@ 229-244 (lines=16) @@
226
        }
227
    }
228
229
    protected function iterageStmts(array $stmts)
230
    {
231
        foreach ($stmts as $stmt) {
232
            if ($stmt instanceof Node\Stmt\ClassMethod) {
233
                yield $stmt;
234
            }
235
236
            if (!isset($stmt->stmts)) {
237
                continue;
238
            }
239
240
            foreach ($this->iterageStmts($stmt->stmts) as $stmt) {
241
                yield $stmt;
242
            }
243
        }
244
    }
245
246
    protected function extractNamespace(array $ast)
247
    {