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

WarningParser   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 1
c 3
b 0
f 0
lcom 0
cbo 1
dl 0
loc 18
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A parsingFoundResult() 0 6 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