Unwind   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A method() 0 3 1
A __toString() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Innmind\Compose\Compilation\Service\Argument;
5
6
use Innmind\Compose\{
7
    Compilation\Service\Argument,
8
    Compilation\MethodName,
9
    Definition\Name
10
};
11
12
final class Unwind implements Argument
13
{
14
    private $method;
15
16 4
    public function __construct(Name $name)
17
    {
18 4
        $this->method = new MethodName($name);
19 4
    }
20
21 1
    public function method(): MethodName
22
    {
23 1
        return $this->method;
24
    }
25
26 1
    public function __toString(): string
27
    {
28 1
        return sprintf('...$this->%s()', $this->method);
29
    }
30
}
31