1 | <?php namespace Mascame\Artificer\Controllers; |
||
20 | class BaseModelController extends BaseController |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * The Eloquent model instance |
||
25 | * @var \Eloquent |
||
26 | */ |
||
27 | protected $model; |
||
28 | |||
29 | /** |
||
30 | * |
||
31 | */ |
||
32 | public function __construct() |
||
47 | |||
48 | /** |
||
49 | * |
||
50 | */ |
||
51 | protected function checkPermissions() |
||
64 | |||
65 | /** |
||
66 | * @param $data |
||
67 | */ |
||
68 | protected function handleData($data) |
||
76 | |||
77 | /** |
||
78 | * @param $data |
||
79 | * @return null |
||
80 | */ |
||
81 | protected function getFields($data) |
||
107 | |||
108 | // Prepares fields for factory |
||
109 | // protected function prepareFields($data) { |
||
110 | // $fields = []; |
||
111 | // |
||
112 | // foreach ($data as $key => $item) { |
||
113 | // foreach ($this->modelObject->columns as $column) { |
||
114 | // $fields[$key][$column] = $item->$column; |
||
115 | // } |
||
116 | // } |
||
117 | // |
||
118 | // return $fields; |
||
119 | // } |
||
120 | |||
121 | /** |
||
122 | * @return array |
||
123 | */ |
||
124 | protected function getSort() |
||
131 | |||
132 | /** |
||
133 | * @param $items |
||
134 | * @return null |
||
135 | */ |
||
136 | public static function getCurrentModelId($items) |
||
140 | |||
141 | |||
142 | /** |
||
143 | * @param $keys |
||
144 | * @param $values |
||
145 | * @return mixed |
||
146 | */ |
||
147 | protected function except($keys, $values) |
||
157 | |||
158 | /** |
||
159 | * @param $data |
||
160 | * @return array |
||
161 | */ |
||
162 | protected function handleFiles($data) |
||
181 | |||
182 | /** |
||
183 | * @param $type |
||
184 | * @return bool |
||
185 | */ |
||
186 | protected function isFileInput($type) |
||
190 | |||
191 | /** |
||
192 | * This is used for simple upload (no plugins) |
||
193 | * |
||
194 | * @param $fieldName |
||
195 | * @param null $path |
||
196 | * @return string |
||
197 | */ |
||
198 | protected function uploadFile($fieldName, $path = null) |
||
216 | |||
217 | /** |
||
218 | * @param $modelName |
||
219 | * @param $id |
||
220 | * @param $field |
||
221 | * @return null |
||
222 | */ |
||
223 | protected function getRelatedFieldOutput($modelName, $id, $field) |
||
245 | |||
246 | /** |
||
247 | * @param $validator |
||
248 | * @param $route |
||
249 | * @param null $id |
||
250 | * @return Redirect |
||
251 | */ |
||
252 | protected function redirect($validator, $route, $id = null) |
||
268 | |||
269 | |||
270 | /** |
||
271 | * @param $modelName |
||
272 | * @param null $data |
||
273 | * @param $sort |
||
274 | * @return $this |
||
275 | */ |
||
276 | protected function all($modelName, $data = null, $sort) |
||
284 | } |
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..