CachePoolPruneTask::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
/*
4
 * This file is part of the Magallanes package.
5
 *
6
 * (c) Andrés Montañez <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Mage\Task\BuiltIn\Symfony;
13
14
use Symfony\Component\Process\Process;
15
16
/**
17
 * Symfony Task - Cache Pool Prune
18
 *
19
 * @author Andrés Montañez <[email protected]>
20
 */
21
class CachePoolPruneTask extends AbstractSymfonyTask
22
{
23 48
    public function getName(): string
24
    {
25 48
        return 'symfony/cache-pool-prune';
26
    }
27
28 20
    public function getDescription(): string
29
    {
30 20
        return '[Symfony] Cache Pool Prune';
31
    }
32
33 19
    public function execute(): bool
34
    {
35 19
        $options = $this->getOptions();
36 19
        $command = $options['console'] . ' cache:pool:prune --env=' . $options['env'] . ' ' . $options['flags'];
37
38
        /** @var Process $process */
39 19
        $process = $this->runtime->runCommand(trim($command));
40
41 19
        return $process->isSuccessful();
42
    }
43
}
44