Completed
Push — master ( 4fafa1...e65f27 )
by Nicolas
12:12
created

LumenFileRepository   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A createModule() 0 4 1
1
<?php
2
3
namespace Nwidart\Modules\Lumen;
4
5
use Nwidart\Modules\FileRepository;
6
7
class LumenFileRepository extends FileRepository
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    protected function createModule(...$args)
13
    {
14
        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...
15
    }
16
}
17