Code Duplication    Length = 11-11 lines in 2 locations

Controller/WebsiteCommentController.php 2 locations

@@ 225-235 (lines=11) @@
222
        return [substr($threadId, 0, $pos), substr($threadId, $pos + 1)];
223
    }
224
225
    private function getTemplate(string $type, string $templateType): string
226
    {
227
        $defaults = $this->getParameter('sulu_comment.default_templates');
228
229
        $types = $this->getParameter('sulu_comment.types');
230
        if (array_key_exists($type, $types)) {
231
            return $types[$type]['templates'][$templateType];
232
        }
233
234
        return $defaults[$templateType];
235
    }
236
237
    private function getNestedCommentsFlag(string $type): string
238
    {
@@ 237-247 (lines=11) @@
234
        return $defaults[$templateType];
235
    }
236
237
    private function getNestedCommentsFlag(string $type): string
238
    {
239
        $default = $this->getParameter('sulu_comment.nested_comments');
240
241
        $types = $this->getParameter('sulu_comment.types');
242
        if (array_key_exists($type, $types)) {
243
            return $types[$type]['nested_comments'];
244
        }
245
246
        return $default;
247
    }
248
}
249