PredefinedIntList   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 22
c 0
b 0
f 0
wmc 2
lcom 1
cbo 0
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A all() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Funivan\CabbageCore\Int\IntList;
6
7
class PredefinedIntList implements IntListInterface
8
{
9
    /**
10
     * @var int[]
11
     */
12
    private $values;
13
14
    /**
15
     */
16 2
    public function __construct(int ...$values)
17
    {
18 2
        $this->values = $values;
19 2
    }
20
21
    /**
22
     * @return int[]|\Generator
23
     */
24 2
    public function all(): \Generator
25
    {
26 2
        yield from $this->values;
27 2
    }
28
}
29