OpeningHoursServiceProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A boot() 0 10 3
A register() 0 4 1
1
<?php
2
3
namespace Webfactor\Laravel\OpeningHours;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class OpeningHoursServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Perform post-registration booting of services.
11
     *
12
     * @return void
13
     */
14 17
    public function boot()
15
    {
16 17
        if ($this->app->runningInConsole()) {
17 17
            if (!class_exists('CreateOpeningHoursTables')) {
18 1
                $timestamp = date('Y_m_d_His', time());
19 1
                $this->publishes([__DIR__.'/../database/migrations/create_opening_hours_tables.php' => database_path('migrations/'.$timestamp.'_create_opening_hours_tables.php')], 'migrations');
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 194 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
20
            }
21 17
            $this->publishes([__DIR__.'/../config/openinghours.php' => config_path('webfactor/openinghours.php')], 'config');
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 125 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
22
        }
23 17
    }
24
25
    /**
26
     * Register any package services.
27
     *
28
     * @return void
29
     */
30 17
    public function register()
31
    {
32
        //
33 17
    }
34
}
35