1 | <?php namespace Mascame\Artificer\Fields; |
||
8 | class FieldFactory |
||
9 | { |
||
10 | |||
11 | public $fieldClass; |
||
12 | public $fields; |
||
13 | public $related_fields = null; |
||
14 | public $custom_fields = null; |
||
15 | |||
16 | /** |
||
17 | * @var FieldParser |
||
18 | */ |
||
19 | public $parser; |
||
20 | |||
21 | /** |
||
22 | * @var Model |
||
23 | */ |
||
24 | public $modelObject; |
||
25 | public $data; |
||
26 | |||
27 | public $namespace = '\Mascame\Artificer\Fields\Types\\'; |
||
28 | |||
29 | public $classMap = array(); |
||
30 | |||
31 | /** |
||
32 | * @param Model $model |
||
33 | */ |
||
34 | public function __construct(Model $model) |
||
40 | |||
41 | /** |
||
42 | * @param $type |
||
43 | * @param $field |
||
44 | * @param $value |
||
45 | * @return mixed |
||
46 | * @throws \Exception |
||
47 | */ |
||
48 | public function make($type, $field, $value) |
||
54 | |||
55 | /** |
||
56 | * @param $type |
||
57 | * @throws \Exception |
||
58 | */ |
||
59 | public function getFieldTypeClass($type) |
||
71 | |||
72 | /** |
||
73 | * @param $data |
||
74 | * @return mixed |
||
75 | */ |
||
76 | public function makeFields($data) |
||
97 | |||
98 | /** |
||
99 | * @param $name |
||
100 | * @return bool|mixed |
||
101 | */ |
||
102 | protected function getTypeFromConfig($name) { |
||
110 | |||
111 | /** |
||
112 | * @param $name |
||
113 | * @return bool |
||
114 | */ |
||
115 | protected function isRelation($name) |
||
119 | |||
120 | /** |
||
121 | * @return array|null |
||
122 | */ |
||
123 | public function getRelated() |
||
140 | |||
141 | /** |
||
142 | * @return array |
||
143 | */ |
||
144 | protected function addRelated() |
||
156 | |||
157 | /** |
||
158 | * @return array |
||
159 | */ |
||
160 | protected function withRelated() |
||
164 | |||
165 | /** |
||
166 | * @return array |
||
167 | */ |
||
168 | protected function addCustomFields() |
||
180 | |||
181 | /** |
||
182 | * @return array |
||
183 | */ |
||
184 | protected function withCustomFields() |
||
188 | |||
189 | /** |
||
190 | * @param $field |
||
191 | * @return null |
||
192 | */ |
||
193 | public function fieldValue($field) |
||
197 | |||
198 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..