Code Duplication    Length = 8-8 lines in 2 locations

src/Tools/Generator.php 2 locations

@@ 196-203 (lines=8) @@
193
    {
194
        // @group tag on the method overrides that on the controller
195
        $docBlockComment = $method->getDocComment();
196
        if ($docBlockComment) {
197
            $phpdoc = new DocBlock($docBlockComment);
198
            foreach ($phpdoc->getTags() as $tag) {
199
                if ($tag->getName() === 'group') {
200
                    return $tag->getContent();
201
                }
202
            }
203
        }
204
205
        $docBlockComment = $controller->getDocComment();
206
        if ($docBlockComment) {
@@ 206-213 (lines=8) @@
203
        }
204
205
        $docBlockComment = $controller->getDocComment();
206
        if ($docBlockComment) {
207
            $phpdoc = new DocBlock($docBlockComment);
208
            foreach ($phpdoc->getTags() as $tag) {
209
                if ($tag->getName() === 'group') {
210
                    return $tag->getContent();
211
                }
212
            }
213
        }
214
215
        return 'general';
216
    }