Passed
Push — master ( 2ee0d1...1e8995 )
by Tomasz
03:21
created

Step::isAllShardsFinishedProgress()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Aggrego\Domain\Model\ProgressiveBoard\Step;
6
7
use Aggrego\Domain\Model\ProgressiveBoard\Shard\Collection;
8
use Aggrego\Domain\Model\ProgressiveBoard\Shard\FinalItem;
9
10
class Step
11
{
12
    /** @var State */
13
    private $state;
14
15
    /** @var Collection */
16
    private $shards;
17
18
    public function __construct(State $state, Collection $shards)
19
    {
20
        $this->state = $state;
21
        $this->shards = $shards;
22
    }
23
24
    public function getState(): State
25
    {
26
        return $this->state;
27
    }
28
29
    public function replace(FinalItem $finalItem): void
30
    {
31
        $this->shards->replace($finalItem);
32
    }
33
34
    public function getShards(): Collection
35
    {
36
        return $this->shards;
37
    }
38
39
    public function isAllShardsFinishedProgress(): bool
40
    {
41
        return $this->shards->isAllShardsFinishedProgress();
42
    }
43
}
44