Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function setInput($input, string $key = null): void |
||
37 | { |
||
38 | if (is_null($key)) { |
||
39 | Assert::isArray($input); |
||
40 | |||
41 | foreach ($input as $key => $value) { |
||
42 | $this->addInput($key, $value); |
||
43 | } |
||
44 | } elseif (array_key_exists($key, $this->testData)) { |
||
45 | $this->testData[$key] = $input; |
||
46 | } else { |
||
47 | $this->addInput($key, $input); |
||
48 | } |
||
90 |