Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
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 |
|
37 | } |
||
38 | |||
39 | 24 | public function setArguments(array $arguments): self |
|
40 | { |
||
46 |