Completed
Push — master ( a8f028...4e52eb )
by Oscar
05:21
created

Formats   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
3
namespace Folk\Providers;
4
5
use Fol\{App, ServiceProviderInterface};
6
use Folk\Formats\FormatFactory;
7
8
class Formats implements ServiceProviderInterface
9
{
10
    public function register(App $app)
11
    {
12
        $app['builder'] = function (App $app): FormatFactory {
13
            return new FormatFactory($app);
0 ignored issues
show
Compatibility introduced by
$app of type object<Fol\App> is not a sub-type of object<Folk\Admin>. It seems like you assume a child class of the class Fol\App 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...
14
        };
15
    }
16
}
17