1 | <?php |
||
12 | class Repository implements RepositoryContract, CriteriaPerformer |
||
13 | { |
||
14 | /** |
||
15 | * @var EloquentModel |
||
16 | */ |
||
17 | protected $model; |
||
18 | |||
19 | /** |
||
20 | * @var Collection |
||
21 | */ |
||
22 | protected $criteria; |
||
23 | |||
24 | /** |
||
25 | * @var bool |
||
26 | */ |
||
27 | protected $skipCriteria = false; |
||
28 | |||
29 | /** |
||
30 | */ |
||
31 | 17 | public function __construct(EloquentModel $model) |
|
36 | |||
37 | /** |
||
38 | * @return EloquentModel |
||
39 | */ |
||
40 | 1 | public function getModel() |
|
44 | |||
45 | /** |
||
46 | * @param array $with |
||
47 | * @return Collection |
||
48 | */ |
||
49 | 1 | public function all(array $with = array()) |
|
60 | |||
61 | /** |
||
62 | * @param int $perPage |
||
63 | * @return mixed |
||
64 | */ |
||
65 | 1 | public function paginate($perPage = 15, array $with = array()) |
|
76 | |||
77 | /** |
||
78 | * @param array $data |
||
79 | * @return EloquentModel |
||
80 | */ |
||
81 | 7 | public function create(array $data) |
|
89 | |||
90 | /** |
||
91 | * @param array $data |
||
92 | * @param $id |
||
93 | * @param string $field |
||
94 | * @return EloquentModel |
||
95 | */ |
||
96 | 2 | public function update(array $data, $id, $field = "id") |
|
110 | |||
111 | /** |
||
112 | * @param $id |
||
113 | * @return integer |
||
114 | */ |
||
115 | 3 | public function delete($id) |
|
123 | |||
124 | /** |
||
125 | * @param $id |
||
126 | * @return mixed |
||
127 | */ |
||
128 | 3 | public function find($id, array $with = array()) |
|
139 | |||
140 | /** |
||
141 | * @param $id |
||
142 | * @return mixed|Exception |
||
143 | */ |
||
144 | 1 | public function findOrFail($id, array $with = array()) |
|
155 | |||
156 | /** |
||
157 | * @param $field |
||
158 | * @param $value |
||
159 | * @return mixed |
||
160 | */ |
||
161 | 1 | public function findBy($field, $value, array $with = array()) |
|
172 | |||
173 | /** |
||
174 | * @param $field |
||
175 | * @param $value |
||
176 | * @return mixed |
||
177 | */ |
||
178 | 1 | public function findByOrFail($field, $value, array $with = array()) |
|
189 | |||
190 | /** |
||
191 | * @param $field |
||
192 | * @param $value |
||
193 | * @return mixed |
||
194 | */ |
||
195 | 1 | public function findAllBy($field, $value, array $with = array()) |
|
206 | |||
207 | /** |
||
208 | * @param array $with |
||
209 | * @return void |
||
210 | */ |
||
211 | 9 | protected function addWithCriteria(array $with = array()) |
|
217 | |||
218 | /** |
||
219 | * |
||
220 | */ |
||
221 | 11 | protected function refresh() |
|
230 | |||
231 | /** |
||
232 | * @param bool $status |
||
233 | * @return $this |
||
234 | */ |
||
235 | public function skipCriteria($status = true) |
||
241 | |||
242 | /** |
||
243 | * @return Collection |
||
244 | */ |
||
245 | 9 | public function getCriteria() |
|
249 | |||
250 | /** |
||
251 | * @param Criteria $criteria |
||
252 | * @return $this |
||
253 | */ |
||
254 | public function getByCriteria(Criteria $criteria) |
||
260 | |||
261 | /** |
||
262 | * @param Criteria $criteria |
||
263 | * @return $this |
||
264 | */ |
||
265 | public function pushCriteria(Criteria $criteria) |
||
271 | |||
272 | /** |
||
273 | * @return $this |
||
274 | */ |
||
275 | 9 | public function applyCriteria() |
|
287 | } |
||
288 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.