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

WarningParser::parseAndContinue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 6
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Paraunit\Parser;
4
5
use Paraunit\Process\ProcessResultInterface;
6
7
class WarningParser extends AbstractParser implements JSONParserChainElementInterface
8
{
9
    const TAG = 'warning';
10
    const TITLE = 'Warnings';
11
    const PARSING_REGEX = '/(?:There (?:was|were) \d+ warnings?:\n\n)((?:.|\n)+)(?:\n--|FAILURES|WARNINGS)/U';
12
13
    /**
14
     * @param ProcessResultInterface $process
15
     *
16
     * @return bool True if chain should continue
17
     */
18 12
    public function parsingFoundResult(ProcessResultInterface $process)
19
    {
20 12
        $this->storeParsedBlocks($process);
21
22 12
        return true;
23
    }
24
}
25