Code Duplication    Length = 8-9 lines in 2 locations

core/src/Support/DocBlock.php 1 location

@@ 126-133 (lines=8) @@
123
            if (strpos($line, '/**') !== false) {
124
                $docblock_start_found = true;
125
            }
126
        } elseif (!$name_found) {
127
            // find name
128
            if (preg_match("/^\s+\*\s+(.+)/", $line, $ma)) {
129
                $param = 'name';
130
                $val = trim($ma[1]);
131
                $name_found = !empty($val);
132
            }
133
        } elseif (!$description_found) {
134
            // find description
135
            if (preg_match("/^\s+\*\s+(.+)/", $line, $ma)) {
136
                $param = 'description';

install/src/functions.php 1 location

@@ 491-499 (lines=9) @@
488
                            $docblock_start_found = true;
489
                        }
490
                        continue;
491
                    } elseif (!$name_found) {
492
                        // find name
493
                        $ma = null;
494
                        if (preg_match("/^\s+\*\s+(.+)/", $line, $ma)) {
495
                            $params['name'] = trim($ma[1]);
496
                            $name_found = !empty($params['name']);
497
                        }
498
                        continue;
499
                    } elseif (!$description_found) {
500
                        // find description
501
                        $ma = null;
502
                        if (preg_match("/^\s+\*\s+(.+)/", $line, $ma)) {