Skip to content

Commit 74a5e4c

Browse files
author
Francois Suter
committed
[TASK] Code cleanup
1 parent ce151bd commit 74a5e4c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Classes/Controller/FlushCacheController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
use Psr\Http\Message\ResponseInterface;
2020
use Psr\Http\Message\ServerRequestInterface;
2121
use TYPO3\CMS\Core\Cache\CacheManager;
22+
use TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException;
23+
use TYPO3\CMS\Core\Http\NullResponse;
2224
use TYPO3\CMS\Core\Utility\GeneralUtility;
2325

2426
/**
@@ -33,13 +35,13 @@ class FlushCacheController
3335
*
3436
* @param ServerRequestInterface $request the current request
3537
* @return ResponseInterface
36-
* @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException
38+
* @throws NoSuchCacheException
3739
*/
3840
public function flushCache(ServerRequestInterface $request): ResponseInterface
3941
{
4042
$cacheFrontend = GeneralUtility::makeInstance(CacheManager::class)->getCache('l10n');
4143
$cacheFrontend->flush();
4244

43-
return new \TYPO3\CMS\Core\Http\NullResponse();
45+
return new NullResponse();
4446
}
4547
}

Classes/Toolbar/ToolbarItem.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@
1919
use TYPO3\CMS\Backend\Routing\Exception\RouteNotFoundException;
2020
use TYPO3\CMS\Backend\Routing\UriBuilder;
2121
use TYPO3\CMS\Backend\Toolbar\ClearCacheActionsHookInterface;
22+
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
2223
use TYPO3\CMS\Core\Utility\GeneralUtility;
2324

2425
/**
2526
* Prepares additional flush cache entry.
26-
*
27-
* @package Cobweb\ClearLanguageCache\Toolbar
28-
* @author Francois Suter <[email protected]>
2927
*/
3028
class ToolbarItem implements ClearCacheActionsHookInterface
3129
{
@@ -65,9 +63,9 @@ public function manipulateCacheActions(&$cacheActions, &$optionValues)
6563
/**
6664
* Wrapper around the global BE user object.
6765
*
68-
* @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
66+
* @return BackendUserAuthentication
6967
*/
70-
protected function getBackendUser()
68+
protected function getBackendUser(): BackendUserAuthentication
7169
{
7270
return $GLOBALS['BE_USER'];
7371
}

0 commit comments

Comments
 (0)