Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
9 | 3 | public function __construct(array $properties, string $className) |
|
10 | { |
||
11 | 3 | $propertyNames = implode(', ', array_keys($properties)); |
|
12 | 3 | if (count($properties) > 1) { |
|
13 | 1 | $message = "Parameters {$propertyNames} are not allowed as input on {$className}"; |
|
14 | } else { |
||
15 | 2 | $message = "Parameter {$propertyNames} is not allowed as input on {$className}"; |
|
16 | } |
||
17 | 3 | parent::__construct($message); |
|
18 | 3 | } |
|
20 |