Code Duplication    Length = 10-10 lines in 2 locations

src/Command/PhpfastcacheClearCommand.php 2 locations

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