Code Duplication    Length = 16-16 lines in 2 locations

src/Paraunit/Parser/ErrorParser.php 1 location

@@ 11-26 (lines=16) @@
8
 * Class ErrorParser
9
 * @package Paraunit\Parser
10
 */
11
class ErrorParser extends AbstractParser implements JSONParserChainElementInterface
12
{
13
    const TAG = 'error';
14
    const TITLE = 'Errors';
15
    const PARSING_REGEX = '/(?:There (?:was|were) \d+ errors?:\n\n)((?:.|\n)+)(?:\n--|FAILURES)/U';
16
17
    /**
18
     * AbstractParser constructor.
19
     *
20
     * @param OutputContainer $outputContainer
21
     */
22
    public function __construct(OutputContainer $outputContainer)
23
    {
24
        parent::__construct($outputContainer, 'E', 'error');
25
    }
26
}
27

src/Paraunit/Parser/FailureParser.php 1 location

@@ 11-26 (lines=16) @@
8
 * Class FailureParser
9
 * @package Paraunit\Parser
10
 */
11
class FailureParser extends AbstractParser implements JSONParserChainElementInterface
12
{
13
    const TAG = 'failure';
14
    const TITLE = 'failures';
15
    const PARSING_REGEX = '/(?:There (?:was|were) \d+ failures?:\n\n)((?:.|\n)+)(?=\nFAILURES)/';
16
17
    /**
18
     * AbstractParser constructor.
19
     *
20
     * @param OutputContainer $outputContainer
21
     */
22
    public function __construct(OutputContainer $outputContainer)
23
    {
24
        parent::__construct($outputContainer, 'F', 'fail');
25
    }
26
}
27