Code Duplication    Length = 10-10 lines in 2 locations

src/Command/PhpfastcacheClearCommand.php 2 locations

@@ 101-110 (lines=10) @@
98
        $caches = $this->parameters;
99
100
        if ($driver) {
101
            if (\array_key_exists($driver, $caches[ 'drivers' ])) {
102
                $callback($driver);
103
                if (!\count($failedInstances)) {
104
                    $io->success("Cache instance {$driver} cleared");
105
                } else {
106
                    $io->error("Cache instance {$driver} not cleared");
107
                }
108
            } else {
109
                $io->error("Cache instance {$driver} does not exists");
110
            }
111
        } else {
112
            foreach ($caches[ 'drivers' ] as $name => $parameters) {
113
                $callback($name);
@@ 111-120 (lines=10) @@
108
            } else {
109
                $io->error("Cache instance {$driver} does not exists");
110
            }
111
        } else {
112
            foreach ($caches[ 'drivers' ] as $name => $parameters) {
113
                $callback($name);
114
            }
115
            if (!\count($failedInstances)) {
116
                $io->success('All caches instances got cleared');
117
            } else {
118
                $io->success('Almost all caches instances got cleared, except these: ' . \implode(', ', $failedInstances));
119
            }
120
        }
121
    }
122
}