PredefinedIntList::all()   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

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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