1 | <?php namespace C4tech\RayEmitter\Domain; |
||
7 | abstract class Entity implements EntityInterface |
||
8 | { |
||
9 | /** |
||
10 | * The Entity's identity. |
||
11 | * @var ValueObjectInterface |
||
12 | */ |
||
13 | protected $identity; |
||
14 | |||
15 | /** |
||
16 | * @inheritDoc |
||
17 | */ |
||
18 | 13 | public function __construct(ValueObjectInterface $identifier) |
|
19 | { |
||
20 | 13 | if (method_exists($this, 'setId')) { |
|
21 | 5 | $this->setId($identifier); |
|
|
|||
22 | 5 | } else { |
|
23 | 9 | $this->identity = $identifier; |
|
24 | } |
||
25 | 13 | } |
|
26 | |||
27 | /** |
||
28 | * @inheritDoc |
||
29 | */ |
||
30 | 2 | public function getId() |
|
34 | |||
35 | /** |
||
36 | * Set |
||
37 | * |
||
38 | * Protected method to set property value. |
||
39 | * @param string $property Requested "property" |
||
40 | * @param mixed $value Requested value |
||
41 | * @return mixed |
||
42 | */ |
||
43 | 4 | protected function set($property, $value) |
|
56 | |||
57 | /** |
||
58 | * Magic Getter |
||
59 | * |
||
60 | * Expose getter methods as properties. |
||
61 | * @param string $property Requested "property" |
||
62 | * @return mixed |
||
63 | */ |
||
64 | 4 | public function __get($property) |
|
76 | } |
||
77 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.