Passed
Pull Request — develop (#4)
by Stephen
02:57
created

StringArray::getItem()   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
namespace Spinen\Ncentral\Type;
4
5
class StringArray
6
{
7
8
    /**
9
     * @var string
10
     */
11
    private $item;
12
13
    /**
14
     * @return string
15
     */
16
    public function getItem()
17
    {
18
        return $this->item;
19
    }
20
21
    /**
22
     * @param string $item
23
     * @return StringArray
24
     */
25
    public function withItem($item)
26
    {
27
        $new = clone $this;
28
        $new->item = $item;
29
30
        return $new;
31
    }
32
33
34
}
35
36