Completed
Push — master ( d8ea60...50356d )
by Nicolas
12s
created

Repository::formatCached()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 2
nop 1
dl 0
loc 12
ccs 0
cts 9
cp 0
crap 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Nwidart\Modules\Lumen;
4
5
use Nwidart\Modules\Json;
6
use Nwidart\Modules\Repository as BaseRepository;
7
8
class Repository extends BaseRepository
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    protected function createModule(...$args)
14
    {
15
        return new Module(...$args);
0 ignored issues
show
Bug introduced by
The call to Module::__construct() misses some required arguments starting with $name.
Loading history...
Documentation introduced by
$args is of type array<integer,?>, but the function expects a object<Illuminate\Container\Container>.

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