Completed
Push — master ( 7f5a29...8ce298 )
by Scott
13s
created

PhpMdLoaderStrict   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 20
rs 10
c 1
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isValidLine() 0 4 1
A getDescription() 0 5 1
1
<?php
2
namespace exussum12\CoverageChecker;
3
4
use XMLReader;
5
6
/**
7
 * Class PhpMdLoaderStrict
8
 * Used for parsing phpmd xml output
9
 * Strict mode reports errors multiple times
10
 * @package exussum12\CoverageChecker
11
 */
12
class PhpMdLoaderStrict extends PhpMdLoader
13
{
14
    /**
15
     * {@inheritdoc}
16
     * Strict reports every offending line not just the first
17
     */
18
    public function isValidLine($file, $lineNumber)
19
    {
20
        return empty($this->errors[$file][$lineNumber]);
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public static function getDescription()
27
    {
28
        return 'Parses the xml report format of phpmd, this mode ' .
29
            'reports multi line violations once per line they occur ';
30
    }
31
}
32