| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2.003 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 2 | public function execute($linkID, $collection = false) |
|
| 15 | { |
||
| 16 | 2 | $files = FileLinkFiles::where('link_id', $linkID) |
|
| 17 | 2 | ->orderBy('user_id', 'ASC') |
|
| 18 | 2 | ->orderBy('created_at', 'ASC') |
|
| 19 | 2 | ->with('Files') |
|
| 20 | 2 | ->with('User') |
|
| 21 | 2 | ->get(); |
|
| 22 | |||
| 23 | 2 | Log::debug('Retrieved files attached to File Link ID '.$linkID.'. Data Gathered - ', array($files)); |
|
| 24 | 2 | if($collection) |
|
| 25 | { |
||
| 26 | 2 | return new FileLinkFilesCollection($files); |
|
| 27 | } |
||
| 28 | |||
| 29 | return $files; |
||
| 30 | } |
||
| 47 |