Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
MethodCall
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getMethodName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getArguments
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace pvc\container\defs;
4
5use pvc\interfaces\container\DefinitionInterface;
6use pvc\interfaces\container\MethodCallInterface;
7
8class MethodCall implements MethodCallInterface
9{
10    public string $methodName;
11
12    /**
13     * @var array<mixed>
14     */
15    public array $arguments = [];
16
17    /**
18     * @param  string  $methodName
19     * @param mixed|null ...$args
20     */
21    public function __construct (string $methodName, ... $args)
22    {
23        $this->methodName = $methodName;
24        $this->arguments  = array_merge($this->arguments, $args);
25    }
26
27    public function getMethodName(): string
28    {
29        return $this->methodName;
30    }
31
32    /**
33     * getArguments
34     * @return array<mixed>
35     */
36    public function getArguments(): array
37    {
38        return $this->arguments;
39    }
40}