1 | <?php |
||
2 | |||
3 | namespace Nip\Router\Console; |
||
4 | |||
5 | use ByTIC\Console\Command; |
||
6 | use Exception; |
||
7 | use Symfony\Component\Filesystem\Filesystem; |
||
8 | |||
9 | /** |
||
10 | * Class ClearCommand |
||
11 | * @package Nip\Config\Console |
||
12 | */ |
||
13 | class ClearCommand extends Command |
||
14 | { |
||
15 | protected function configure() |
||
16 | { |
||
17 | parent::configure(); |
||
18 | $this->setName('router:clear'); |
||
19 | $this->setDescription('Remove the route cache'); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * @inheritDoc |
||
24 | * @throws Exception |
||
25 | */ |
||
26 | protected function handle() |
||
27 | { |
||
28 | $app = $this->getByticApp(); |
||
29 | $configPath = $app->getCachedRoutesPath(); |
||
0 ignored issues
–
show
|
|||
30 | |||
31 | $filesystem = new Filesystem(); |
||
32 | $filesystem->remove($configPath); |
||
33 | |||
34 | $this->info('Routes cached cleared!'); |
||
35 | |||
36 | return 0; |
||
37 | } |
||
38 | } |
||
39 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.