Code Duplication    Length = 8-11 lines in 3 locations

typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php 1 location

@@ 553-563 (lines=11) @@
550
            )->execute()->fetchColumn(0);
551
552
        $hasReferences = $numberOfReferences > 0;
553
        if ($hasReferences) {
554
            /** @var FlashMessage $flashMessage */
555
            $flashMessage = GeneralUtility::makeInstance(
556
                FlashMessage::class,
557
                $this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:message.description.folderNotDeletedHasFilesWithReferences'),
558
                $this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:message.header.folderNotDeletedHasFilesWithReferences'),
559
                FlashMessage::WARNING,
560
                true
561
            );
562
            $this->addFlashMessage($flashMessage);
563
        }
564
565
        return $hasReferences;
566
    }

typo3/sysext/taskcenter/Classes/Controller/TaskModuleController.php 2 locations

@@ 181-188 (lines=8) @@
178
                // Check if the task is restricted to admins only
179
                if ($this->checkAccess($extKey, $taskClass)) {
180
                    $actionContent .= $taskInstance->getTask();
181
                } else {
182
                    $flashMessage = GeneralUtility::makeInstance(
183
                        FlashMessage::class,
184
                        $this->getLanguageService()->getLL('error-access'),
185
                        $this->getLanguageService()->getLL('error_header'),
186
                        FlashMessage::ERROR
187
                    );
188
                }
189
            } else {
190
                // Error if the task is not an instance of \TYPO3\CMS\Taskcenter\TaskInterface
191
                $flashMessage = GeneralUtility::makeInstance(
@@ 189-197 (lines=9) @@
186
                        FlashMessage::ERROR
187
                    );
188
                }
189
            } else {
190
                // Error if the task is not an instance of \TYPO3\CMS\Taskcenter\TaskInterface
191
                $flashMessage = GeneralUtility::makeInstance(
192
                    FlashMessage::class,
193
                    sprintf($this->getLanguageService()->getLL('error_no-instance'), $taskClass, TaskInterface::class),
194
                    $this->getLanguageService()->getLL('error_header'),
195
                    FlashMessage::ERROR
196
                );
197
            }
198
        } else {
199
            $flashMessage = GeneralUtility::makeInstance(
200
                FlashMessage::class,