Skip to content

Commit 95db2db

Browse files
author
Francois Suter
committed
[TASK] Clean up code
1 parent 154afbd commit 95db2db

File tree

5 files changed

+20
-40
lines changed

5 files changed

+20
-40
lines changed

Classes/Command/FlushLanguageCacheCommand.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ class FlushLanguageCacheCommand extends Command
3434

3535
/**
3636
* Configures the command by setting its name, description and options.
37-
*
38-
* @return void
3937
*/
4038
public function configure(): void
4139
{
@@ -45,11 +43,6 @@ public function configure(): void
4543

4644
/**
4745
* Executes the command to clear the cache.
48-
*
49-
* @param InputInterface $input
50-
* @param OutputInterface $output
51-
*
52-
* @return int
5346
*/
5447
protected function execute(InputInterface $input, OutputInterface $output): int
5548
{

Classes/EventListener/ClearCacheListener.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ class ClearCacheListener
3232

3333
/**
3434
* Adds the flush language cache menu item.
35-
*
36-
* @param ModifyClearCacheActionsEvent $event
37-
* @return void
3835
*/
3936
public function __invoke(ModifyClearCacheActionsEvent $event): void
4037
{
@@ -55,7 +52,7 @@ public function __invoke(ModifyClearCacheActionsEvent $event): void
5552
]
5653
);
5754
$event->addCacheActionIdentifier(self::$itemKey);
58-
} catch (RouteNotFoundException $e) {
55+
} catch (RouteNotFoundException) {
5956
// Do nothing, i.e. do not add the menu item if the AJAX route cannot be found
6057
}
6158
}

Configuration/Backend/Routes.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<?php
2+
3+
use Cobweb\FlushLanguageCache\Controller\FlushCacheController;
4+
25
return [
36
'flushLanguageCache' => [
47
'path' => '/flush_language_cache/clear',
5-
'target' => \Cobweb\FlushLanguageCache\Controller\FlushCacheController::class . '::flushCache'
8+
'target' => FlushCacheController::class . '::flushCache'
69
]
710
];

Configuration/Commands.php

Lines changed: 0 additions & 6 deletions
This file was deleted.

ext_emconf.php

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11
<?php
22

3-
/*********************************************************************
4-
* Extension configuration file for ext "flush_language_cache".
5-
*********************************************************************/
6-
73
$EM_CONF[$_EXTKEY] = [
8-
'title' => 'Flush language cache',
9-
'description' => 'Adds an item to the flush cache menu to clear just the language (l10n) cache. Also provides a command-line tool for that.',
10-
'category' => 'be',
11-
'state' => 'stable',
12-
'uploadfolder' => 0,
13-
'createDirs' => '',
14-
'clearCacheOnLoad' => 1,
15-
'author' => 'Francois Suter',
16-
'author_email' => '[email protected]',
17-
'author_company' => '',
18-
'version' => '4.0.1',
19-
'constraints' => [
20-
'depends' => [
21-
'typo3' => '12.4.0-13.1.99',
22-
'php' => '8.1.0-8.3.99'
23-
],
24-
'conflicts' => [],
25-
'suggests' => [],
4+
'title' => 'Flush language cache',
5+
'description' => 'Adds an item to the flush cache menu to clear just the language (l10n) cache. Also provides a command-line tool for that.',
6+
'category' => 'be',
7+
'state' => 'stable',
8+
'author' => 'Francois Suter',
9+
'author_email' => '[email protected]',
10+
'author_company' => '',
11+
'version' => '4.0.1',
12+
'constraints' => [
13+
'depends' => [
14+
'typo3' => '12.4.0-13.1.99',
15+
'php' => '8.1.0-8.3.99'
2616
],
17+
'conflicts' => [],
18+
'suggests' => [],
19+
],
2720
];

0 commit comments

Comments
 (0)