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
Push — master ( 5305c0...e83c46 )
by Edi
13s
created

testItAddsCompilerPass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 18
rs 9.4285
cc 1
eloc 13
nc 1
nop 0
1
<?php
2
3
namespace Netgen\Bundle\OpenGraphBundle\Tests;
4
5
use Netgen\Bundle\OpenGraphBundle\DependencyInjection\Compiler\MetaTagHandlersCompilerPass;
6
use Netgen\Bundle\OpenGraphBundle\DependencyInjection\Compiler\TwigRuntimePass;
7
use Netgen\Bundle\OpenGraphBundle\NetgenOpenGraphBundle;
8
use PHPUnit\Framework\TestCase;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
11
class NetgenOpenGraphBundleTest extends TestCase
12
{
13
    public function testItAddsCompilerPass()
14
    {
15
        $container = $this->getMockBuilder(ContainerBuilder::class)
16
            ->disableOriginalConstructor()
17
            ->setMethods(array('addCompilerPass'))
18
            ->getMock();
19
20
        $container->expects($this->at(0))
21
            ->method('addCompilerPass')
22
            ->with(new MetaTagHandlersCompilerPass());
23
24
        $container->expects($this->at(1))
25
            ->method('addCompilerPass')
26
            ->with(new TwigRuntimePass());
27
28
        $bundle = new NetgenOpenGraphBundle();
29
        $bundle->build($container);
0 ignored issues
show
Documentation introduced by
$container is of type object<PHPUnit\Framework\MockObject\MockObject>, but the function expects a object<Symfony\Component...ction\ContainerBuilder>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
30
    }
31
}
32