ServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 8 1
A boot() 0 5 1
1
<?php namespace Rocket\Entities\Support\Laravel5;
2
3
/**
4
 * Laravel5 Implementation of the Entities System
5
 */
6
7
use Illuminate\Support\Facades\Config;
8
use Rocket\Entities\Entity;
9
10
/**
11
 * This is a Service Provider for Laravel 5
12
 */
13
class ServiceProvider extends \Illuminate\Support\ServiceProvider
14
{
15
    /**
16
     * Register the service provider.
17
     *
18
     * @return void
19
     */
20
    public function register()
21 117
    {
22
        $this->publishes(
23 117
            [
24
                __DIR__ . '/config.php' => config_path('rocket_entities.php'),
25 117
            ]
26
        );
27 117
    }
28 117
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function boot()
33 117
    {
34
        Entity::$types = Config::get('rocket_entities.field_types');
0 ignored issues
show
Documentation Bug introduced by
It seems like \Illuminate\Support\Faca..._entities.field_types') of type * is incompatible with the declared type array<integer,object<Rocket\Entities\class>> of property $types.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
35 117
        $this->loadMigrationsFrom(__DIR__.'/../../migrations');
36 117
    }
37
}
38