FixerSet   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 28
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A add() 0 6 1
A correct() 0 8 2
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of the feed-io package.
4
 *
5
 * (c) Alexandre Debril <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace FeedIo\Reader;
12
13
use FeedIo\FeedInterface;
14
15
class FixerSet
16
{
17
    protected $fixers = array();
18
19
    /**
20
     * @param \FeedIo\Reader\FixerAbstract
21
     * @return FixerSet
22
     */
23 12
    public function add(FixerAbstract $fixer) : FixerSet
24
    {
25 12
        $this->fixers[] = $fixer;
26
27 12
        return $this;
28
    }
29
30
    /**
31
     * @param  Result $result
32
     * @return FixerSet
33
     */
34 2
    public function correct(Result $result) : FixerSet
35
    {
36 2
        foreach ($this->fixers as $fixer) {
37 2
            $fixer->correct($result);
38
        }
39
40 2
        return $this;
41
    }
42
}
43