Code Duplication    Length = 10-10 lines in 2 locations

src/Command/PhpfastcacheCommand.php 2 locations

@@ 73-82 (lines=10) @@
70
        $caches = $this->getContainer()->getParameter('phpfastcache');
71
72
        if($driver) {
73
            if(\array_key_exists($driver, $caches['drivers'])){
74
                $callback($driver);
75
                if(!\count($failedInstances)){
76
                    $io->success("Cache instance {$driver} cleared");
77
                }else{
78
                    $io->error("Cache instance {$driver} not cleared");
79
                }
80
            }else{
81
                $io->error("Cache instance {$driver} does not exists");
82
            }
83
        } else {
84
            foreach($caches['drivers'] as $name => $parameters) {
85
                $callback($name);
@@ 83-92 (lines=10) @@
80
            }else{
81
                $io->error("Cache instance {$driver} does not exists");
82
            }
83
        } else {
84
            foreach($caches['drivers'] as $name => $parameters) {
85
                $callback($name);
86
            }
87
            if(!\count($failedInstances)){
88
                $io->success('All caches instances got cleared');
89
            }else{
90
                $io->success('Almost all caches instances got cleared, except these: ' . \implode(', ', $failedInstances));
91
            }
92
        }
93
    }
94
}