Failed Conditions
Push — master ( 17cdc3...604e06 )
by Alexander
05:14
created

CompletionCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 20
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureCompletion() 0 8 1
1
<?php
2
/**
3
 * This file is part of the Code-Insight library.
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @copyright Alexander Obuhovich <[email protected]>
8
 * @link      https://github.com/console-helpers/code-insight
9
 */
10
11
namespace ConsoleHelpers\CodeInsight\Command;
12
13
14
use Stecman\Component\Symfony\Console\BashCompletion\Completion;
15
use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionInterface;
16
use Stecman\Component\Symfony\Console\BashCompletion\Completion\ShellPathCompletion;
17
use Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand as SymfonyCompletionCommand;
18
use Stecman\Component\Symfony\Console\BashCompletion\CompletionHandler;
19
20
class CompletionCommand extends SymfonyCompletionCommand
21
{
22
23
	/**
24
	 * Configure the CompletionHandler instance before it is run
25
	 *
26
	 * @param CompletionHandler $handler Completion handler.
27
	 *
28
	 * @return void
29
	 */
30
	protected function configureCompletion(CompletionHandler $handler)
31
	{
32
		$handler->addHandler(new ShellPathCompletion(
33
			'report:create',
34
		    'project-path',
35
		    Completion::TYPE_ARGUMENT
36
		));
37
	}
38
39
}
40