Code Duplication    Length = 6-6 lines in 2 locations

src/components/cms/document/FolderRouting.php 2 locations

@@ 43-48 (lines=6) @@
40
        {
41
            $cmsComponent->subTemplate = 'documents/folder-form';
42
            $cmsComponent->setParameter(CmsConstants::PARAMETER_MAIN_NAV_CLASS, CmsConstants::PARAMETER_DOCUMENTS);
43
            if (isset($request::$post[CmsConstants::POST_PARAMETER_TITLE], $request::$post[CmsConstants::GET_PARAMETER_PATH])) {
44
                $cmsComponent->storage->getDocuments()->addDocumentFolder($request::$post);
45
                $cmsComponent->storage->getActivityLog()->add('created folder ' . $request::$post[CmsConstants::POST_PARAMETER_TITLE] . ' in path ' . $request::$get[CmsConstants::GET_PARAMETER_PATH], 'plus');
46
                header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsConstants::PARAMETER_CMS_PREFIX) . '/documents');
47
                exit;
48
            }
49
        }
50
51
        /**
@@ 67-72 (lines=6) @@
64
65
            $request::$get[CmsConstants::GET_PARAMETER_PATH] = '/' . $path;
66
67
            if (isset($request::$post[CmsConstants::POST_PARAMETER_TITLE], $request::$post['content'])) {
68
                $cmsComponent->storage->getDocuments()->addDocumentFolder($request::$post);
69
                $cmsComponent->storage->getActivityLog()->add('edited folder ' . $request::$post[CmsConstants::POST_PARAMETER_TITLE] . ' in path ' . $request::$get[CmsConstants::GET_PARAMETER_PATH], 'pencil');
70
                header('Location: ' . $request::$subfolders . $cmsComponent->getParameter(CmsConstants::PARAMETER_CMS_PREFIX) . '/documents');
71
                exit;
72
            }
73
74
            $cmsComponent->setParameter(CmsConstants::PARAMETER_MAIN_NAV_CLASS, CmsConstants::PARAMETER_DOCUMENTS);
75
            $cmsComponent->setParameter(CmsConstants::PARAMETER_FOLDER, $folder);