Code Duplication    Length = 8-8 lines in 2 locations

src/Tools/Generator.php 2 locations

@@ 243-250 (lines=8) @@
240
    {
241
        // @group tag on the method overrides that on the controller
242
        $docBlockComment = $method->getDocComment();
243
        if ($docBlockComment) {
244
            $phpdoc = new DocBlock($docBlockComment);
245
            foreach ($phpdoc->getTags() as $tag) {
246
                if ($tag->getName() === 'group') {
247
                    return $tag->getContent();
248
                }
249
            }
250
        }
251
252
        $docBlockComment = $controller->getDocComment();
253
        if ($docBlockComment) {
@@ 253-260 (lines=8) @@
250
        }
251
252
        $docBlockComment = $controller->getDocComment();
253
        if ($docBlockComment) {
254
            $phpdoc = new DocBlock($docBlockComment);
255
            foreach ($phpdoc->getTags() as $tag) {
256
                if ($tag->getName() === 'group') {
257
                    return $tag->getContent();
258
                }
259
            }
260
        }
261
262
        return config('apidoc.ungrouped_name') ?: 'general';
263
    }