[TASK] Code style cleanup EXT:backend/Classes/Backend/*.php 50/37850/2
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 15 Mar 2015 08:32:21 +0000 (09:32 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Sun, 15 Mar 2015 20:54:57 +0000 (21:54 +0100)
Fixed code style issues "Unnecessary fully qualified name"

Resolves: #65739
Releases: master
Change-Id: I376b9ce9b1b075a8d5ffc7537b0738f227dc3e88
Reviewed-on: http://review.typo3.org/37850
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php
typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
typo3/sysext/backend/Classes/Backend/ToolbarItems/UserToolbarItem.php

index 2d6dcb5..2cbc40c 100644 (file)
@@ -93,7 +93,7 @@ class ClearCacheToolbarItem implements ToolbarItemInterface {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'] as $cacheAction) {
                                $hookObject = GeneralUtility::getUserObj($cacheAction);
                                if (!$hookObject instanceof ClearCacheActionsHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Backend\Toolbar\ClearCacheActionsHookInterface::class, 1228262000);
+                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . ClearCacheActionsHookInterface::class, 1228262000);
                                }
                                $hookObject->manipulateCacheActions($this->cacheActions, $this->optionValues);
                        }
index 162f287..4a5ab79 100644 (file)
@@ -20,6 +20,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface;
 use TYPO3\CMS\Backend\Module\ModuleLoader;
+use TYPO3\CMS\Core\Http\AjaxRequestHandler;
+use TYPO3\CMS\Core\Utility\PathUtility;
 
 /**
  * Class to render the shortcut menu
@@ -192,7 +194,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
         * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj Object of type AjaxRequestHandler
         * @return void
         */
-       public function renderAjaxMenu($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj = NULL) {
+       public function renderAjaxMenu($params = array(), AjaxRequestHandler $ajaxObj = NULL) {
                $menuContent = $this->getDropDown();
                $ajaxObj->addContent('shortcutMenu', $menuContent);
        }
@@ -418,7 +420,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
         * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj Object of type AjaxRequestHandler
         * @return void
         */
-       public function getAjaxShortcutEditForm($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj = NULL) {
+       public function getAjaxShortcutEditForm($params = array(), AjaxRequestHandler $ajaxObj = NULL) {
                $selectedShortcutId = (int)GeneralUtility::_GP('shortcutId');
                $selectedShortcutGroupId = (int)GeneralUtility::_GP('shortcutGroup');
                $selectedShortcut = $this->getShortcutById($selectedShortcutId);
@@ -462,7 +464,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
         * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj Object of type AjaxRequestHandler
         * @return void
         */
-       public function deleteAjaxShortcut($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj = NULL) {
+       public function deleteAjaxShortcut($params = array(), AjaxRequestHandler $ajaxObj = NULL) {
                $databaseConnection = $this->getDatabaseConnection();
                $shortcutId = (int)GeneralUtility::_POST('shortcutId');
                $fullShortcut = $this->getShortcutById($shortcutId);
@@ -483,7 +485,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
         * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj Oject of type AjaxRequestHandler
         * @return void
         */
-       public function createAjaxShortcut($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj = NULL) {
+       public function createAjaxShortcut($params = array(), AjaxRequestHandler $ajaxObj = NULL) {
                $databaseConnection = $this->getDatabaseConnection();
                $languageService = $this->getLanguageService();
                $shortcutCreated = 'failed';
@@ -559,7 +561,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
         * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj Object of type AjaxRequestHandler
         * @return void
         */
-       public function setAjaxShortcut($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj = NULL) {
+       public function setAjaxShortcut($params = array(), AjaxRequestHandler $ajaxObj = NULL) {
                $databaseConnection = $this->getDatabaseConnection();
                $backendUser = $this->getBackendUser();
                $shortcutId = (int)GeneralUtility::_POST('shortcutId');
@@ -689,7 +691,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface {
                                        // Change icon of fileadmin references - otherwise it doesn't differ with Web->List
                                        $icon = str_replace('mod/file/list/list.gif', 'mod/file/file.gif', $icon);
                                        if (GeneralUtility::isAbsPath($icon)) {
-                                               $icon = '../' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($icon);
+                                               $icon = '../' . PathUtility::stripPathSitePrefix($icon);
                                        }
                                        // @todo: hardcoded width as we don't have a way to address module icons with an API yet.
                                        $icon = '<img src="' . htmlspecialchars($icon) . '" alt="' . $titleAttribute . '" width="16">';
index ae483b4..a3a01c5 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Backend\Domain\Repository\Module\BackendModuleRepository;
 use TYPO3\CMS\Backend\Domain\Model\Module\BackendModule;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 
 /**
  * User toolbar item
@@ -104,7 +105,7 @@ class UserToolbarItem implements ToolbarItemInterface {
                // Logout button
                $buttonLabel = 'LLL:EXT:lang/locallang_core.xlf:' . ($backendUser->user['ses_backuserid'] ? 'buttons.exit' : 'buttons.logout');
                $dropdown[] = '<li class="reset-dropdown">';
-               $dropdown[] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('logout')) . '" class="btn btn-danger pull-right" target="_top"><i class="fa fa-power-off"></i> ';
+               $dropdown[] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('logout')) . '" class="btn btn-danger pull-right" target="_top"><i class="fa fa-power-off"></i> ';
                $dropdown[] = $languageService->sL($buttonLabel, TRUE);
                $dropdown[] = '</a>';
                $dropdown[] = '</li>';