UpoloServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 12 3
A register() 0 6 1
1
<?php
2
3
namespace Hamidrezaniazi\Upolo;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class UpoloServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Bootstrap the application services.
11
     */
12
    public function boot()
13
    {
14
        if (method_exists($this, 'loadFactoriesFrom')) {
15
            $this->loadFactoriesFrom(__DIR__.'/../database/factories');
0 ignored issues
show
Deprecated Code introduced by
The method Illuminate\Support\Servi...er::loadFactoriesFrom() has been deprecated with message: Will be removed in a future Laravel version.

This method has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.

Loading history...
16
        }
17
18
        if (! class_exists('CreateModelHistoriesTable')) {
19
            $this->publishes([
20
                __DIR__.'/../database/migrations/create_files_table.php.stub' => database_path('migrations/'.date('Y_m_d_His', time()).'_create_files_table.php'),
21
            ], 'migrations');
22
        }
23
    }
24
25
    /**
26
     * Register the application services.
27
     */
28
    public function register()
29
    {
30
        $this->app->singleton('upolo', function () {
31
            return new UpoloSkeleton();
32
        });
33
    }
34
}
35