Passed
Push — master ( 69774c...de7969 )
by Sebastian
02:46
created

PrePush   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 5
c 0
b 0
f 0
dl 0
loc 19
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 5 1
1
<?php
2
3
/**
4
 * This file is part of CaptainHook
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CaptainHook\App\Console\Command\Hook;
13
14
use CaptainHook\App\Console\Command\Hook;
15
use CaptainHook\App\Hooks;
16
use Symfony\Component\Console\Input\InputArgument;
17
18
/**
19
 * Class PrePush
20
 *
21
 * @package CaptainHook
22
 * @author  Sebastian Feldmann <[email protected]>
23
 * @link    https://github.com/captainhookphp/captainhook
24
 * @since   Class available since Release 0.9.0
25
 */
26
class PrePush extends Hook
27
{
28
    /**
29
     * Hook to execute.
30
     *
31
     * @var string
32
     */
33
    protected $hookName = Hooks::PRE_PUSH;
34
35
    /**
36
     * Configure the command
37
     *
38 1
     * @return void
39
     */
40 1
    protected function configure(): void
41 1
    {
42 1
        parent::configure();
43 1
        $this->addArgument('target', InputArgument::OPTIONAL, 'Target repository name');
44
        $this->addArgument('url', InputArgument::OPTIONAL, 'Target repository url');
45
    }
46
}
47