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

EiTuple   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 51
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A withSecond() 0 6 1
A getSecond() 0 3 1
A getFirst() 0 3 1
A withFirst() 0 6 1
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