Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
38 | 9 | final protected function setPayload(array $payload) |
|
39 | { |
||
40 | 9 | foreach ($payload as $name => $value) { |
|
41 | 9 | if (!in_array($name, $this->getProperties())) { |
|
42 | 6 | throw UndefinedPropertyException::propertyOfClass($name, $this); |
|
43 | } |
||
44 | |||
45 | 3 | $this->$name = $value; |
|
46 | 3 | } |
|
47 | |||
48 | 3 | $this->payload = $payload; |
|
49 | 3 | } |
|
50 | |||
67 |