Code Duplication    Length = 19-20 lines in 2 locations

src/Console/Command/Hook/PrepareCommitMsg.php 1 location

@@ 24-43 (lines=20) @@
21
 * @link    https://github.com/sebastianfeldmann/captainhook
22
 * @since   Class available since Release 3.1.0
23
 */
24
class PrepareCommitMsg extends Hook
25
{
26
    /**
27
     * Hook to execute
28
     *
29
     * @var string
30
     */
31
    protected $name = 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

src/Console/Command/Hook/PrePush.php 1 location

@@ 24-42 (lines=19) @@
21
 * @link    https://github.com/sebastianfeldmann/captainhook
22
 * @since   Class available since Release 0.9.0
23
 */
24
class PrePush extends Hook
25
{
26
    /**
27
     * Hook to execute.
28
     *
29
     * @var string
30
     */
31
    protected $name = Hooks::PRE_PUSH;
32
33
    /**
34
     * Configure the command.
35
     */
36
    protected function configure()
37
    {
38
        parent::configure();
39
        $this->addArgument('target', InputArgument::OPTIONAL, 'Target repository name');
40
        $this->addArgument('url', InputArgument::OPTIONAL, 'Target repository url');
41
    }
42
}
43