1 | <?php |
||
12 | class EntityContainer extends ContainerAccessors { |
||
13 | /** |
||
14 | * @var EntityModel $model |
||
15 | */ |
||
16 | protected $model; |
||
17 | |||
18 | /** |
||
19 | * @var \Common\Accessors $accessors |
||
20 | */ |
||
21 | protected $accessors; |
||
22 | |||
23 | /** |
||
24 | * @var array $original |
||
25 | */ |
||
26 | protected $original = array(); |
||
27 | |||
28 | /** |
||
29 | * @var array $delta |
||
30 | */ |
||
31 | protected $delta = array(); |
||
32 | |||
33 | /** @noinspection PhpMissingParentConstructorInspection */ |
||
34 | /** |
||
35 | * Entity\EntityContainer constructor. |
||
36 | * |
||
37 | * @param EntityModel $model |
||
38 | */ |
||
39 | 1 | public function __construct($model) { |
|
42 | |||
43 | /** |
||
44 | * @param EntityModel $model |
||
45 | */ |
||
46 | 1 | public function setModel(EntityModel $model) { |
|
50 | |||
51 | /** |
||
52 | * @return EntityModel |
||
53 | */ |
||
54 | 1 | public function getModel() { |
|
57 | |||
58 | 1 | protected function processNumeric($name, $value) { |
|
71 | |||
72 | 1 | public function __set($name, $value) { |
|
81 | |||
82 | } |
||
83 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: