MethodCall   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 13
c 3
b 0
f 0
dl 0
loc 39
ccs 15
cts 15
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getArguments() 0 3 1
A setName() 0 5 1
A getName() 0 3 1
A fromYaml() 0 8 1
A setArguments() 0 5 1
1
<?php
2
3
namespace Palmtree\Container\Definition;
4
5
class MethodCall
6
{
7
    /** @var string */
8
    private $name;
9
    /** @var array */
10
    private $arguments = [];
11
12 23
    public static function fromYaml(array $yaml): self
13
    {
14 23
        $methodCall = new self();
15
16 23
        $methodCall->setName($yaml['method'])
17 23
                   ->setArguments($yaml['arguments'] ?? []);
18
19 23
        return $methodCall;
20
    }
21
22 24
    public function getName(): string
23
    {
24 24
        return $this->name;
25
    }
26
27 24
    public function setName(string $name): self
28
    {
29 24
        $this->name = $name;
30
31 24
        return $this;
32
    }
33
34 24
    public function getArguments(): array
35
    {
36 24
        return $this->arguments;
37
    }
38
39 24
    public function setArguments(array $arguments): self
40
    {
41 24
        $this->arguments = $arguments;
42
43 24
        return $this;
44
    }
45
}
46