| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 2 | public function execute(): bool |
|
| 35 | { |
||
| 36 | 2 | $options = $this->getOptions(); |
|
| 37 | |||
| 38 | 2 | if (!$options['pools']) { |
|
| 39 | 1 | throw new ErrorException('Parameter "pools" is not defined'); |
|
| 40 | } |
||
| 41 | |||
| 42 | 1 | $command = sprintf( |
|
| 43 | '%s cache:pool:clear %s --env=%s %s', |
||
| 44 | 1 | $options['console'], |
|
| 45 | 1 | $options['pools'], |
|
| 46 | 1 | $options['env'], |
|
| 47 | 1 | $options['flags'] |
|
| 48 | ); |
||
| 49 | |||
| 50 | /** @var Process $process */ |
||
| 51 | 1 | $process = $this->runtime->runCommand(trim($command)); |
|
| 52 | |||
| 53 | 1 | return $process->isSuccessful(); |
|
| 54 | } |
||
| 61 |