CompletionCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 17
c 2
b 0
f 0
dl 0
loc 31
ccs 0
cts 21
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureCompletion() 0 21 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\ShellPathCompletion;
16
use Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand as SymfonyCompletionCommand;
17
use Stecman\Component\Symfony\Console\BashCompletion\CompletionHandler;
18
19
class CompletionCommand extends SymfonyCompletionCommand
20
{
21
22
	/**
23
	 * Configure the CompletionHandler instance before it is run
24
	 *
25
	 * @param CompletionHandler $handler Completion handler.
26
	 *
27
	 * @return void
28
	 */
29
	protected function configureCompletion(CompletionHandler $handler)
30
	{
31
		$handler->addHandler(new ShellPathCompletion(
32
			'sync',
33
		    'project-path',
34
		    Completion::TYPE_ARGUMENT
35
		));
36
		$handler->addHandler(new ShellPathCompletion(
37
			'bc',
38
		    'source-project-path',
39
		    Completion::TYPE_ARGUMENT
40
		));
41
		$handler->addHandler(new ShellPathCompletion(
42
			'bc',
43
		    'target-project-path',
44
		    Completion::TYPE_ARGUMENT
45
		));
46
		$handler->addHandler(new ShellPathCompletion(
47
			'report',
48
		    'project-path',
49
		    Completion::TYPE_ARGUMENT
50
		));
51
	}
52
53
}
54