| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 80% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | final class FunctionCall implements Component |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * The name of this function. |
||
| 18 | */ |
||
| 19 | public string|null $name = null; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The list of parameters. |
||
| 23 | */ |
||
| 24 | public ArrayObj|null $parameters = null; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string|null $name the name of the function to be called |
||
| 28 | * @param string[]|ArrayObj|null $parameters the parameters of this function |
||
| 29 | */ |
||
| 30 | 34 | public function __construct(string|null $name = null, array|ArrayObj|null $parameters = null) |
|
| 31 | { |
||
| 32 | 34 | $this->name = $name; |
|
| 33 | 34 | if (is_array($parameters)) { |
|
| 34 | 2 | $this->parameters = new ArrayObj($parameters); |
|
| 35 | 32 | } elseif ($parameters instanceof ArrayObj) { |
|
| 36 | 2 | $this->parameters = $parameters; |
|
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | 4 | public function build(): string |
|
| 43 | } |
||
| 44 | |||
| 45 | public function __toString(): string |
||
| 50 |