1 | <?php |
||
21 | class Fetcher extends Repository |
||
22 | { |
||
23 | /** |
||
24 | * @var Project |
||
25 | */ |
||
26 | protected $model; |
||
27 | |||
28 | public function __construct(Project $model) |
||
32 | |||
33 | /** |
||
34 | * Get project by its key. |
||
35 | * |
||
36 | * @param string $key |
||
37 | * |
||
38 | * @return Project |
||
39 | */ |
||
40 | public function getByKey($key) |
||
44 | |||
45 | /** |
||
46 | * Returns collection of active projects. |
||
47 | * |
||
48 | * @return Collection |
||
49 | */ |
||
50 | public function getActiveProjects() |
||
54 | |||
55 | /** |
||
56 | * Get collection of notes in project. |
||
57 | * |
||
58 | * @return Collection |
||
59 | */ |
||
60 | public function getNotes() |
||
64 | |||
65 | /** |
||
66 | * Returns collection of public projects. |
||
67 | * |
||
68 | * @return Collection |
||
69 | */ |
||
70 | public function getPublicProjects() |
||
74 | |||
75 | /** |
||
76 | * Returns all users that are not assigned in the current project. |
||
77 | * |
||
78 | * @return array |
||
79 | */ |
||
80 | public function getNotMembers() |
||
84 | |||
85 | /** |
||
86 | * Fetch and filter issues in the project. |
||
87 | * |
||
88 | * @param int $status |
||
89 | * @param array $filter |
||
90 | * |
||
91 | * @return Collection |
||
92 | */ |
||
93 | public function getIssues($status = Project\Issue::STATUS_OPEN, array $filter = []) |
||
120 | |||
121 | /** |
||
122 | * Fetch and filter issues in the project. |
||
123 | * |
||
124 | * @param int $status |
||
125 | * @param array $filter |
||
126 | * |
||
127 | * @return Collection |
||
128 | */ |
||
129 | public function getIssuesForLoggedUser($status = Project\Issue::STATUS_OPEN, array $filter = []) |
||
137 | |||
138 | /** |
||
139 | * Fetch issues assigned to a user. |
||
140 | * |
||
141 | * @param User $user |
||
142 | * |
||
143 | * @return Collection |
||
144 | */ |
||
145 | public function getAssignedOrCreatedIssues(User $user) |
||
153 | |||
154 | /** |
||
155 | * Get collection of issue created by user. |
||
156 | * |
||
157 | * @param User $user |
||
158 | * |
||
159 | * @return Collection |
||
160 | */ |
||
161 | public function getCreatedIssues(User $user) |
||
169 | |||
170 | /** |
||
171 | * Get collection of issue assigned to user. |
||
172 | * |
||
173 | * @param User $user |
||
174 | * |
||
175 | * @return Collection |
||
176 | */ |
||
177 | public function getAssignedIssues(User $user) |
||
185 | |||
186 | /** |
||
187 | * Get collection of recent activities in the project. |
||
188 | * |
||
189 | * @param User|null $user |
||
190 | * @param int $limit |
||
191 | * |
||
192 | * @return Collection |
||
193 | */ |
||
194 | public function getRecentActivities(User $user = null, $limit = 10) |
||
209 | |||
210 | /** |
||
211 | * Returns projects with issues details eager loaded. |
||
212 | * |
||
213 | * @return Collection |
||
214 | */ |
||
215 | public function getPublicProjectsWithRecentIssues() |
||
224 | |||
225 | /** |
||
226 | * Returns collection of tags for Kanban view. |
||
227 | * |
||
228 | * @param User $user |
||
229 | * |
||
230 | * @return Collection |
||
231 | */ |
||
232 | public function getKanbanTagsForUser(User $user) |
||
236 | |||
237 | /** |
||
238 | * Get collection of tags for kanban view. |
||
239 | * |
||
240 | * @return Collection |
||
241 | */ |
||
242 | public function getKanbanTags() |
||
246 | |||
247 | /** |
||
248 | * Returns users assigned to the project that can fix issues (with edit permission). |
||
249 | * |
||
250 | * @return Collection |
||
251 | */ |
||
252 | public function getUsersCanFixIssue() |
||
256 | |||
257 | /** |
||
258 | * Get collection of users in project. |
||
259 | * |
||
260 | * @return Collection |
||
261 | */ |
||
262 | public function getUsers() |
||
266 | |||
267 | /** |
||
268 | * Sort by updated_at column. |
||
269 | * |
||
270 | * @param Builder $query |
||
271 | * @param string $order |
||
272 | * |
||
273 | * @return void |
||
274 | */ |
||
275 | protected function sortByUpdated(Builder $query, $order = 'asc') |
||
279 | |||
280 | /** |
||
281 | * Sort by issues tag group |
||
282 | * Note: this sort will return the collection. |
||
283 | * |
||
284 | * @param Builder $query |
||
285 | * @param string $tagGroup |
||
286 | * @param string $order |
||
287 | * |
||
288 | * @return Collection |
||
289 | */ |
||
290 | protected function sortByTag(Builder $query, $tagGroup, $order = 'asc') |
||
313 | |||
314 | /** |
||
315 | * Returns projects with open issue count. |
||
316 | * |
||
317 | * @param int $status |
||
318 | * @param int $private |
||
319 | * |
||
320 | * @return Collection |
||
321 | */ |
||
322 | public function getProjectsWithOpenIssuesCount($status = Project::STATUS_OPEN, $private = Project::PRIVATE_YES) |
||
332 | |||
333 | /** |
||
334 | * Return projects with count of open & closed issues. |
||
335 | * |
||
336 | * @param array $projectIds |
||
337 | * |
||
338 | * @return Collection |
||
339 | */ |
||
340 | public function getProjectsWithCountIssues(array $projectIds) |
||
347 | |||
348 | /** |
||
349 | * Get collection of issues group by a list of tags. |
||
350 | * |
||
351 | * @param Collection $tagIds |
||
352 | * @return Collection |
||
353 | */ |
||
354 | public function getIssuesGroupByTags(Collection $tagIds) |
||
372 | } |
||
373 |
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.