Completed
Pull Request — develop (#39)
by Axel
03:13
created

FeedbackTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 17
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testEntity() 0 15 1
1
<?php
2
3
namespace Developtech\AgilityBundle\Tests\Model;
4
5
use Developtech\AgilityBundle\Entity\Feedback;
6
use Developtech\AgilityBundle\Entity\Project;
7
use Developtech\AgilityBundle\Tests\Mock\User;
8
9
class FeedbackTest extends \PHPUnit_Framework_TestCase {
10
    public function testEntity() {
11
        $feedback =
0 ignored issues
show
Unused Code introduced by
$feedback 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...
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