Conditions | 4 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function __construct($entity, $property) |
||
25 | { |
||
26 | if (!is_object($entity)) { |
||
27 | throw new \InvalidArgumentException('The "$entity" parameter must be an object.'); |
||
28 | } elseif (!empty($property) && is_string($property)) { |
||
29 | throw new \InvalidArgumentException('The "$property" parameter must be a non empty string.'); |
||
30 | } |
||
31 | |||
32 | $this->entity = $entity; |
||
33 | $this->property = $property; |
||
34 | } |
||
35 | |||
52 |