GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 13526a...f52031 )
by Toby
14:25 queued 11s
created

OldFileController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 16
c 1
b 0
f 0
rs 10
ccs 8
cts 8
cp 1
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A index() 0 13 3
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\Module\UploadFile\Http\Controllers\ParticipantApi;
4
5
use BristolSU\Module\UploadFile\Models\File;
6
7
class OldFileController
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class OldFileController
Loading history...
8
{
9
10 1
    public function index()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function index()
Loading history...
11
    {
12 1
        $files = collect();
13 1
        foreach(settings('tags_to_merge', []) as $tag) {
0 ignored issues
show
Coding Style introduced by
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
14 1
            foreach(File::withTag($tag)->get() as $file) {
0 ignored issues
show
Coding Style introduced by
Expected "foreach (...) {\n"; found "foreach(...) {\n"
Loading history...
15 1
                $files->push($file);
16
            }
17
        }
18
        return $files->unique(function(File $file) {
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Coding Style introduced by
Expected 1 space after FUNCTION keyword; 0 found
Loading history...
19 1
            return $file->id;
20
        })->map(function(File $file) {
0 ignored issues
show
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
Coding Style introduced by
Expected 1 space after FUNCTION keyword; 0 found
Loading history...
21 1
            return $file->load(['statuses', 'comments']);
22 1
        })->values();
0 ignored issues
show
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
23
    }
24
}