ClearCache   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 8 1
1
<?php declare(strict_types=1);
2
/**
3
 * Anime List Client
4
 *
5
 * An API client for Kitsu and MyAnimeList to manage anime and manga watch lists
6
 *
7
 * PHP version 7
8
 *
9
 * @package     AnimeListClient
10
 * @author      Timothy J. Warren <[email protected]>
11
 * @copyright   2015 - 2017  Timothy J. Warren
12
 * @license     http://www.opensource.org/licenses/mit-license.html  MIT License
13
 * @version     4.0
14
 * @link        https://github.com/timw4mail/HummingBirdAnimeClient
15
 */
16
17
namespace Aviat\AnimeClient\Command;
18
19
/**
20
 * Clears the API Cache
21
 */
22
class ClearCache extends BaseCommand {
23
	/**
24
	 * Run the image conversion script
25
	 *
26
	 * @param array $args
27
	 * @param array $options
28
	 * @return void
29
	 * @throws \ConsoleKit\ConsoleException
30
	 */
31
	public function execute(array $args, array $options = [])
32
	{
33
		$this->setContainer($this->setupContainer());
34
		$cache = $this->container->get('cache');
35
		$cache->clear();
36
		
37
		$this->echoBox('API Cache has been cleared.');
38
	}
39
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
40