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.
Completed
Pull Request — master (#42)
by
unknown
01:59
created

classE::method()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace namespaceA;
4
5
class classA {
6
7
}
8
9
namespace namespaceC\namespaceD;
10
11
class classD {
12
13
}
14
15
interface interfaceA {
16
17
}
18
19
namespace namespaceB;
20
21
use namespaceA\classA as classC;
22
use namespaceC\namespaceD as namespaceDAlias;
23
24
class classB {
25
26
    private $_objectA;
27
28
    private $_objectB;
29
30
    public function __construct() {
31
        $this->_objectA = new classC();
32
        $this->_objectB = new namespaceDAlias\classD();
33
    }
34
}
35
36
class classE extends namespaceDAlias\classD implements namespaceDAlias\interfaceA {
37
38
    public function method(?namespaceDAlias\classD $objectD) : ?namespaceDAlias\classD {
0 ignored issues
show
Unused Code introduced by
The parameter $objectD is not used and could be removed.

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

Loading history...
39
        $func = function () : ?namespaceDAlias\classD {
0 ignored issues
show
Unused Code introduced by
$func is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
40
41
        };
42
    }
43
}