Passed
Pull Request — develop (#4)
by Stephen
04:51
created

EiTuple::withFirst()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
1
<?php
2
3
namespace Spinen\Nable\Ncentral\Type;
4
5
class EiTuple
6
{
7
8
    /**
9
     * @var mixed
10
     */
11
    private $first;
12
13
    /**
14
     * @var mixed
15
     */
16
    private $second;
17
18
    /**
19
     * @return mixed
20
     */
21
    public function getFirst()
22
    {
23
        return $this->first;
24
    }
25
26
    /**
27
     * @param mixed $first
28
     * @return EiTuple
29
     */
30
    public function withFirst($first)
31
    {
32
        $new = clone $this;
33
        $new->first = $first;
34
35
        return $new;
36
    }
37
38
    /**
39
     * @return mixed
40
     */
41
    public function getSecond()
42
    {
43
        return $this->second;
44
    }
45
46
    /**
47
     * @param mixed $second
48
     * @return EiTuple
49
     */
50
    public function withSecond($second)
51
    {
52
        $new = clone $this;
53
        $new->second = $second;
54
55
        return $new;
56
    }
57
58
59
}
60
61