Completed
Push — master ( 5fe2ea...bba9f0 )
by Matthew
13:23
created

LiveJobsGridSourceTest::getLiveGridSource()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Dtc\QueueBundle\Tests\ORM;
4
5
use Dtc\QueueBundle\ORM\LiveJobsGridSource;
6
use Dtc\QueueBundle\Tests\Doctrine\BaseJobManagerTest;
7
use Dtc\QueueBundle\Tests\Doctrine\BaseLiveJobGridSourceTest;
8
9
/**
10
 * This test requires local mongodb running.
11
 */
12
class LiveJobsGridSourceTest extends BaseLiveJobGridSourceTest
13
{
14
    public function getLiveGridSource()
15
    {
16
        return new LiveJobsGridSource(BaseJobManagerTest::$jobManager);
0 ignored issues
show
Compatibility introduced by
\Dtc\QueueBundle\Tests\D...anagerTest::$jobManager of type object<Dtc\QueueBundle\Model\JobManagerInterface> is not a sub-type of object<Dtc\QueueBundle\ORM\JobManager>. It seems like you assume a concrete implementation of the interface Dtc\QueueBundle\Model\JobManagerInterface to be always present.

This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.

Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.

Loading history...
17
    }
18
19
    public static function setUpBeforeClass()
20
    {
21
        JobManagerTest::setUpBeforeClass();
22
    }
23
}
24