Code Duplication    Length = 7-7 lines in 2 locations

src/PhpGitHooks/Infrastructure/PhpLint/PhpLintHandler.php 1 location

@@ 45-51 (lines=7) @@
42
        }
43
44
        /* @var Process $process */
45
        if (false === $process->isSuccessful()) {
46
            $this->outputHandler->setError($process->getErrorOutput());
47
            $this->output->writeln($this->outputHandler->getError());
48
            $this->output->writeln(BadJobLogo::paint($messages[MessageConfigData::KEY_ERROR_MESSAGE]));
49
50
            throw new PhpLintException();
51
        }
52
53
        $this->output->writeln($this->outputHandler->getSuccessfulStepMessage());
54
    }

src/PhpGitHooks/Infrastructure/CodeSniffer/CodeSnifferHandler.php 1 location

@@ 62-68 (lines=7) @@
59
                $phpCs = $processBuilder->getProcess();
60
                $phpCs->run();
61
62
                if (false === $phpCs->isSuccessful()) {
63
                    $this->outputHandler->setError($phpCs->getOutput());
64
                    $this->output->writeln($this->outputHandler->getError());
65
                    $this->output->writeln(BadJobLogo::paint($messages[MessageConfigData::KEY_ERROR_MESSAGE]));
66
67
                    throw new InvalidCodingStandardException();
68
                }
69
            }
70
        }
71