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