Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Ups\Entity\AddressValidation; |
||
8 | 2 | public function __construct(\SimpleXMLElement $object) |
|
9 | { |
||
10 | 2 | if ($object->count() == 0) { |
|
11 | throw new \InvalidArgumentException(__METHOD__ . ': The passed object does not have any child nodes.'); |
||
12 | } |
||
13 | 2 | $this->code = $object->Code; |
|
|
|||
14 | 2 | $this->description = $object->Description; |
|
15 | 2 | } |
|
16 | } |
||
17 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.