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 — develop ( df61b8...d9ddd1 )
by Toby
06:11
created

BindRoleRepository::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\Module\AssignRoles\Http\Middleware;
4
5
use BristolSU\ControlDB\Contracts\Repositories\Pivots\UserGroup;
6
use BristolSU\ControlDB\Contracts\Repositories\Pivots\UserRole;
7
use BristolSU\ControlDB\Contracts\Repositories\Role;
8
use BristolSU\Module\AssignRoles\Support\LogicRoleRepository;
9
use BristolSU\Module\AssignRoles\Support\LogicUserGroupRepository;
10
use BristolSU\Support\Logic\Contracts\LogicTester;
11
use Illuminate\Http\Request;
12
13
class BindRoleRepository
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class BindRoleRepository
Loading history...
14
{
15
16
    /**
0 ignored issues
show
Coding Style introduced by
Missing short description in doc comment
Loading history...
17
     * @var LogicTester
18
     */
19
    private $logicTester;
0 ignored issues
show
Coding Style introduced by
Private member variable "logicTester" must be prefixed with an underscore
Loading history...
20
21 38
    public function __construct(LogicTester $logicTester)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function __construct()
Loading history...
22
    {
23 38
        $this->logicTester = $logicTester;
24 38
    }
25
26 38
    public function handle(Request $request, \Closure $next)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function handle()
Loading history...
27
    {
28
        app()->extend(Role::class, function($roleRepository, $app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
        app()->extend(Role::class, function($roleRepository, /** @scrutinizer ignore-unused */ $app) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

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...
29 38
            return new LogicRoleRepository($roleRepository, $this->logicTester);
30 38
        });
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...
31
32
        app()->extend(UserRole::class, function($userRole, $app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

32
        app()->extend(UserRole::class, function($userRole, /** @scrutinizer ignore-unused */ $app) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

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...
33 17
            return new LogicUserGroupRepository($userRole, $this->logicTester);
34 38
        });
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...
35
        
36 38
        return $next($request);
37
    }
38
    
39
}