Completed
Pull Request — develop (#39)
by Axel
10:52
created

FeedbackTest::testEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 15
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 13
nc 1
nop 0
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