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

PrePush::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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