BaseModifierCollection::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Thruster\Component\HttpModifier;
4
5
use Psr\Http\Message\MessageInterface;
6
7
/**
8
 * Class BaseModifierCollection
9
 *
10
 * @package Thruster\Component\HttpModifier
11
 * @author  Aurimas Niekis <[email protected]>
12
 */
13
class BaseModifierCollection
14
{
15
    /**
16
     * @var ModifierInterface[]
17
     */
18
    protected $collection;
19
20 12
    public function __construct()
21
    {
22 12
        $this->collection = [];
23 12
    }
24
25
    /**
26
     * @return ModifierInterface[]
27
     */
28 8
    public function all() : array
29
    {
30 8
        return $this->collection;
31
    }
32
}
33