Completed
Push — output_parsers_refactor ( 9ffc6c...755930 )
by Alessandro
09:57
created

ErrorParser::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
ccs 1
cts 1
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Paraunit\Parser;
4
5
use Paraunit\Printer\OutputContainer;
6
7
/**
8
 * Class ErrorParser
9
 * @package Paraunit\Parser
10
 */
11 View Code Duplication
class ErrorParser extends AbstractParser implements JSONParserChainElementInterface
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...
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 11
     * AbstractParser constructor.
19
     *
20 11
     * @param OutputContainer $outputContainer
21
     */
22 11
    public function __construct(OutputContainer $outputContainer)
23
    {
24
        parent::__construct($outputContainer, 'E', 'error');
25
    }
26
}
27