IterateResult::setValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * @author Maxim Sokolovsky
4
 */
5
6
namespace WS\Utils\Collections\Iterator;
7
8
class IterateResult
9
{
10
    private $value;
11
    private $isRunOut = false;
12
13 13
    public function setValue($value): self
14
    {
15 13
        $this->value = $value;
16
17 13
        return $this;
18
    }
19
20 8
    public function setAsRunOut(): self
21
    {
22 8
        $this->isRunOut = true;
23
24 8
        return $this;
25
    }
26
27 13
    public function isRunOut(): bool
28
    {
29 13
        return $this->isRunOut;
30
    }
31
32 13
    public function getValue()
33
    {
34 13
        return $this->value;
35
    }
36
}