This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
10
{
11
use TranslatedRouteCommandContext;
12
/**
13
* The console command name.
14
*
15
* @var string
16
*/
17
protected $name = 'route:trans:clear';
18
/**
19
* The console command description.
20
*
21
* @var string
22
*/
23
protected $description = 'Remove the translated route cache files for each locale';
24
/**
25
* The filesystem instance.
26
*
27
* @var \Illuminate\Filesystem\Filesystem
28
*/
29
protected $files;
30
/**
31
* Create a new route clear command instance.
32
*
33
* @param \Illuminate\Filesystem\Filesystem $files
34
*/
35
public function __construct(Filesystem $files)
36
{
37
parent::__construct();
38
$this->files = $files;
39
}
40
/**
41
* Execute the console command.
42
*
43
* @return void
44
*/
45
public function handle()
46
{
47
foreach ($this->getSupportedLocales() as $locale) {
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.