| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 47 | public function execute() |
||
| 48 | { |
||
| 49 | $this->getApplication()->outputTitle('Cache: Clear'); |
||
| 50 | |||
| 51 | if ($this->cache instanceof FlushableCache) |
||
| 52 | { |
||
| 53 | $this->cache->flushAll(); |
||
| 54 | |||
| 55 | $this->getApplication()->out('<info>The application cache has been cleared.</info>'); |
||
| 56 | } |
||
| 57 | else |
||
| 58 | { |
||
| 59 | $this->getApplication()->out( |
||
| 60 | sprintf( |
||
| 61 | '<comment>This command only supports clearing the cache with %1$s instances that implement the %2$s interface.</comment>', |
||
| 62 | Cache::class, |
||
| 63 | FlushableCache::class |
||
| 64 | ) |
||
| 65 | ); |
||
| 66 | } |
||
| 67 | |||
| 68 | return true; |
||
| 69 | } |
||
| 70 | |||
| 95 |