PredefinedFloatList   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 20
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\Float\FloatList;
6
7
class PredefinedFloatList implements FloatListInterface
8
{
9
    /**
10
     * @var float[]
11
     */
12
    private $items;
13
14 1
    public function __construct(float ...$items)
15
    {
16 1
        $this->items = $items;
17 1
    }
18
19
    /**
20
     * @return float[]|\Generator
21
     */
22 1
    public function all(): \Generator
23
    {
24 1
        yield from $this->items;
25 1
    }
26
}
27