PostCheckout   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 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 PostCheckout
20
 *
21
 * @package CaptainHook
22
 * @author  Sebastian Feldmann <[email protected]>
23
 * @link    https://github.com/captainhook-git/captainhook
24
 * @since   Class available since Release 4.1.0
25
 */
26
class PostCheckout extends Hook
27
{
28
    /**
29
     * Hook to execute.
30
     *
31
     * @var string
32
     */
33
    protected string $hookName = Hooks::POST_CHECKOUT;
34
35
    /**
36
     * Configure the command
37
     *
38
     * @return void
39
     */
40 3
    protected function configure(): void
41
    {
42 3
        parent::configure();
43 3
        $this->addArgument(Hooks::ARG_PREVIOUS_HEAD, InputArgument::OPTIONAL, 'Previous HEAD');
44 3
        $this->addArgument(Hooks::ARG_NEW_HEAD, InputArgument::OPTIONAL, 'New HEAD');
45 3
        $this->addArgument(Hooks::ARG_MODE, InputArgument::OPTIONAL, 'Checkout mode 1 branch 0 file');
46
    }
47
}
48