Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | public function testEntity() { |
||
11 | $feedback = |
||
|
|||
12 | (new Feedback()) |
||
13 | ->setId(1) |
||
14 | ->setName('Add licensee to your application !') |
||
15 | ->setSlug('add-licensee-to-your-application') |
||
16 | ->setDescription('The licensee is mandatory for any website. You must add it to yours.') |
||
17 | ->setStatus(Feedback::STATUS_TO_DO) |
||
18 | ->setProject(new Project()) |
||
19 | ->setAuthor((new User())) |
||
20 | ->setDeveloper(new User()) |
||
21 | ->setCreatedAt(new \DateTime()) |
||
22 | ->setUpdatedAt(new \DateTime()) |
||
23 | ; |
||
24 | } |
||
25 | } |
||
26 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
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.