AbstractInteractor   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 23
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A all() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace CCT\Component\Collections\Interactors;
6
7
abstract class AbstractInteractor implements InteractorInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $elements;
13
14
    /**
15
     * AbstractInteractor constructor.
16
     *
17
     * @param array $elements
18
     */
19 29
    public function __construct(array $elements)
20
    {
21 29
        $this->elements = $elements;
22 29
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27 9
    public function all(): array
28
    {
29 9
        return $this->elements;
30
    }
31
}
32