Code Duplication    Length = 5-5 lines in 4 locations

typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php 4 locations

@@ 640-644 (lines=5) @@
637
        /** @var $targetFolderObject \TYPO3\CMS\Core\Resource\Folder */
638
        $targetFolderObject = $this->getFileObject($cmds['target']);
639
        // Basic check
640
        if (!$targetFolderObject instanceof Folder) {
641
            $this->writeLog(2, 2, 100, 'Destination "%s" was not a directory', [$cmds['target']]);
642
            $this->addMessageToFlashMessageQueue('FileUtility.DestinationWasNotADirectory', [$cmds['target']]);
643
            return false;
644
        }
645
        // If this is TRUE, we append _XX to the file name if
646
        $appendSuffixOnConflict = (string)$cmds['altName'];
647
        $resultObject = null;
@@ 729-733 (lines=5) @@
726
        $sourceFileObject = $this->getFileObject($cmds['data']);
727
        $targetFolderObject = $this->getFileObject($cmds['target']);
728
        // Basic check
729
        if (!$targetFolderObject instanceof Folder) {
730
            $this->writeLog(3, 2, 100, 'Destination "%s" was not a directory', [$cmds['target']]);
731
            $this->addMessageToFlashMessageQueue('FileUtility.DestinationWasNotADirectory', [$cmds['target']]);
732
            return false;
733
        }
734
        $alternativeName = (string)$cmds['altName'];
735
        $resultObject = null;
736
        // Moving the file
@@ 890-894 (lines=5) @@
887
    public function func_newfolder($cmds)
888
    {
889
        $targetFolderObject = $this->getFileObject($cmds['target']);
890
        if (!$targetFolderObject instanceof Folder) {
891
            $this->writeLog(6, 2, 104, 'Destination "%s" was not a directory', [$cmds['target']]);
892
            $this->addMessageToFlashMessageQueue('FileUtility.DestinationWasNotADirectory', [$cmds['target']]);
893
            return false;
894
        }
895
        $resultObject = null;
896
        $folderName = $cmds['data'];
897
        try {
@@ 932-936 (lines=5) @@
929
    public function func_newfile($cmds)
930
    {
931
        $targetFolderObject = $this->getFileObject($cmds['target']);
932
        if (!$targetFolderObject instanceof Folder) {
933
            $this->writeLog(8, 2, 104, 'Destination "%s" was not a directory', [$cmds['target']]);
934
            $this->addMessageToFlashMessageQueue('FileUtility.DestinationWasNotADirectory', [$cmds['target']]);
935
            return false;
936
        }
937
        $resultObject = null;
938
        $fileName = $cmds['data'];
939
        try {