Completed
Push — compiler ( 5bd2e3...2cb518 )
by Akihito
09:43
created

AppModule   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 7
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Package\Compiler\Module;
6
7
use BEAR\Package\PackageModule;
8
use Ray\Di\AbstractModule;
9
10
class AppModule extends AbstractModule
11
{
12
    protected function configure()
13
    {
14
        $this->install(new PackageModule());
0 ignored issues
show
Documentation introduced by
new \BEAR\Package\PackageModule() is of type object<BEAR\Package\PackageModule>, but the function expects a object<self>.

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...
15
    }
16
}
17