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

StringArray   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getItem() 0 3 1
A withItem() 0 6 1
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