Code Duplication    Length = 5-5 lines in 2 locations

codegen/func.php 1 location

@@ 94-98 (lines=5) @@
91
    }
92
    $count = $uls->count();
93
    $parsing = [];
94
    foreach ($uls->eq($count == 2 ? 1 : 0)->find('li') as $param) {
95
        if ($parsedParam = parseParams(pq($param)->text())) {
96
            $parsing[] = $parsedParam;
97
        }
98
    }
99
    if ($count == 2) {
100
        $returnParam = parseParams($uls->eq(0)->text());
101
        $returnParam['result'] = $parsing;

codegen/generate.php 1 location

@@ 46-50 (lines=5) @@
43
            continue;
44
        }
45
        $params = [];
46
        foreach ($tr->find('td')->eq(2)->find('li') as $param) {
47
            if ($parsedParam = parseParams(pq($param)->text())) {
48
                $params[] = $parsedParam;
49
            }
50
        }
51
        $returns = parseReturns($uls = $tr->find('td')->eq(3)->htmlOuter());
52
        $method = [
53
            'name' => $name,