LaravelDBBackupProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 4
Bugs 1 Features 0
Metric Value
eloc 8
dl 0
loc 30
rs 10
c 4
b 1
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 9 1
A boot() 0 6 1
1
<?php
2
3
namespace EDouna\LaravelDBBackup;
4
5
use EDouna\LaravelDBBackup\Commands\Backup;
6
use EDouna\LaravelDBBackup\Commands\Restore;
7
use Illuminate\Support\ServiceProvider;
8
9
class LaravelDBBackupProvider extends ServiceProvider
10
{
11
    /**
12
     * Register services.
13
     *
14
     * @return void
15
     */
16
    public function register()
17
    {
18
        // Register the config
19
        $this->mergeConfigFrom(__DIR__.'/../config/db-backup.php', 'db-backup');
0 ignored issues
show
Bug introduced by
The method mergeConfigFrom() does not exist on EDouna\LaravelDBBackup\LaravelDBBackupProvider. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        $this->/** @scrutinizer ignore-call */ 
20
               mergeConfigFrom(__DIR__.'/../config/db-backup.php', 'db-backup');

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
20
21
        // Register the commands
22
        $this->commands([
0 ignored issues
show
Bug introduced by
The method commands() does not exist on EDouna\LaravelDBBackup\LaravelDBBackupProvider. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
        $this->/** @scrutinizer ignore-call */ 
23
               commands([

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
23
            Backup::class,
24
            Restore::class,
25
        ]);
26
    }
27
28
    /**
29
     * Bootstrap services.
30
     *
31
     * @return void
32
     */
33
    public function boot()
34
    {
35
        // Initialize the config
36
        $this->publishes([
0 ignored issues
show
Bug introduced by
The method publishes() does not exist on EDouna\LaravelDBBackup\LaravelDBBackupProvider. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

36
        $this->/** @scrutinizer ignore-call */ 
37
               publishes([

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
37
            __DIR__.'/../config/db-backup.php' => config_path('db-backup.php'),
38
        ], 'config');
39
    }
40
}
41