[TASK] Use ::class instead of strings 98/37798/3
authorFrank Nägler <typo3@naegler.net>
Thu, 12 Mar 2015 19:29:06 +0000 (20:29 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Sun, 15 Mar 2015 15:40:58 +0000 (16:40 +0100)
In some cases makeInstance is used with strings instead
of ::class. This patch fix it.

Resolves: #65704
Releases: master
Change-Id: I69afa653f50efbebaa7456acfb5d20f401e639fb
Reviewed-on: http://review.typo3.org/37798
Reviewed-by: Frank Nägler <typo3@naegler.net>
Tested-by: Frank Nägler <typo3@naegler.net>
Reviewed-by: Stephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Type/File/ImageInfo.php
typo3/sysext/feedit/Classes/FrontendEditPanel.php
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php

index 7cebda7..7019bfe 100644 (file)
@@ -864,7 +864,7 @@ class HtmlParser {
                                                                                                if ($tagAttrib[0][$attr][0] === '#') {
                                                                                                        if ($params['prefixLocalAnchors'] == 2) {
                                                                                                                /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObjectRenderer */
-                                                                                                               $contentObjectRenderer = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
+                                                                                                               $contentObjectRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
                                                                                                                $prefix = $contentObjectRenderer->getUrlToCurrentLocation();
                                                                                                        } else {
                                                                                                                $prefix = GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
index dc64f90..a41c716 100644 (file)
@@ -67,7 +67,7 @@ class ImageInfo extends FileInfo {
         */
        protected function getLogger(){
                /** @var $loggerManager \TYPO3\CMS\Core\Log\LogManager */
-               $loggerManager = GeneralUtility::makeInstance('TYPO3\CMS\Core\Log\LogManager');
+               $loggerManager = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Log\LogManager::class);
 
                return $loggerManager->getLogger(get_class($this));
        }
index 0930e54..e631e9a 100644 (file)
@@ -65,7 +65,7 @@ class FrontendEditPanel {
                $this->databaseConnection = $databaseConnection ?: $GLOBALS['TYPO3_DB'];
                $this->frontendController = $frontendController ?: $GLOBALS['TSFE'];
                $this->backendUser = $backendUser ?: $GLOBALS['BE_USER'];
-               $this->cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');
+               $this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
                $this->cObj->start(array());
        }
 
index 2a66017..92a2e4f 100644 (file)
@@ -707,7 +707,7 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
         */
        public function fileName($pre) {
                /** @var $basicFileFunctions \TYPO3\CMS\Core\Utility\File\BasicFileUtility */
-               $basicFileFunctions = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Utility\\File\\BasicFileUtility');
+               $basicFileFunctions = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\File\BasicFileUtility::class);
                $filePrefix = implode('_', array_merge($this->combinedTextStrings, $this->combinedFileNames));
                $filePrefix = $basicFileFunctions->cleanFileName($filePrefix);