Completed
Push — master ( dde524...92e3a2 )
by Sebastian
06:05
created

PrepareCommitMsg::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
crap 1
1
<?php
2
/**
3
 * This file is part of CaptainHook.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace CaptainHook\App\Console\Command\Hook;
11
12
use CaptainHook\App\Console\Command\Hook;
13
use CaptainHook\App\Hooks;
14
use Symfony\Component\Console\Input\InputArgument;
15
16
/**
17
 * Class PrepareCommitMessage
18
 *
19
 * @package CaptainHook
20
 * @author  Sebastian Feldmann <[email protected]>
21
 * @link    https://github.com/sebastianfeldmann/captainhook
22
 * @since   Class available since Release 3.1.0
23
 */
24 View Code Duplication
class PrepareCommitMsg extends Hook
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
25
{
26
    /**
27
     * Hook to execute
28
     *
29
     * @var string
30
     */
31
    protected $hookName = Hooks::PREPARE_COMMIT_MSG;
32
33
    /**
34
     * Configure the command
35
     */
36
    protected function configure()
37
    {
38
        parent::configure();
39
        $this->addArgument('file', InputArgument::REQUIRED, 'File containing the commit log message');
40
        $this->addArgument('mode', InputArgument::OPTIONAL, 'Current commit mode');
41
        $this->addArgument('hash', InputArgument::OPTIONAL, 'Given commit hash');
42
    }
43
}
44