StringArray   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 26
ccs 0
cts 6
cp 0
rs 10
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