GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( e5e78d...6c2a09 )
by Florian
10:13
created

ClearIndexCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 3 1
A execute() 0 8 1
1
<?php
2
3
/*
4
 * This file is part of the Stinger Entity Search package.
5
 *
6
 * (c) Oliver Kotte <[email protected]>
7
 * (c) Florian Meyer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
namespace StingerSoft\EntitySearchBundle\Command;
13
14
use StingerSoft\EntitySearchBundle\Services\SearchService;
15
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
16
use Symfony\Component\Console\Input\InputInterface;
17
use Symfony\Component\Console\Output\OutputInterface;
18
19
class ClearIndexCommand extends ContainerAwareCommand {
20
21
	/**
22
	 *
23
	 * {@inheritdoc}
24
	 *
25
	 * @see \Symfony\Component\Console\Command\Command::configure()
26
	 */
27
	protected function configure() {
28
		$this->setName('stinger:search::clear')->setDescription('Clears the configured search index');
29
	}
30
31
	/**
32
	 *
33
	 * {@inheritdoc}
34
	 *
35
	 * @see \Symfony\Component\Console\Command\Command::execute()
36
	 */
37
	protected function execute(InputInterface $input, OutputInterface $output) {
38
		/**
39
		 *
40
		 * @var SearchService $searchService
41
		 */
42
		$searchService = $this->getContainer()->get(SearchService::SERVICE_ID);
43
		$searchService->clearIndex();
44
	}
45
}
46
47