Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2.004 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | 2 | public function execute($linkID, $collection = false) |
|
13 | { |
||
14 | 2 | $files = FileLinkFiles::where('link_id', $linkID) |
|
15 | 2 | ->orderBy('user_id', 'ASC') |
|
16 | 2 | ->orderBy('created_at', 'ASC') |
|
17 | 2 | ->with('Files') |
|
18 | 2 | ->with('User') |
|
19 | 2 | ->get(); |
|
20 | |||
21 | 2 | if($collection) |
|
22 | { |
||
23 | 2 | return new FileLinkFilesCollection($files); |
|
24 | } |
||
25 | |||
26 | return $files; |
||
27 | } |
||
43 |