DatabaseBackupServiceProvider::boot()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 6
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 11
rs 10
1
<?php
2
3
namespace Ikechukwukalu\Databasebackup;
4
5
use Illuminate\Support\ServiceProvider;
6
use Ikechukwukalu\Databasebackup\Console\Commands\DatabaseBackupCommand;
7
8
class DatabaseBackupServiceProvider extends ServiceProvider
9
{
10
    public const CONFIG = __DIR__.'/config/databasebackup.php';
11
12
    /**
13
     * Bootstrap the application services.
14
     *
15
     * @return void
16
     */
17
    public function boot()
18
    {
19
        if ($this->app->runningInConsole()) {
0 ignored issues
show
Bug introduced by
The method runningInConsole() does not exist on Tests\Laravel\App. ( Ignorable by Annotation )

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

19
        if ($this->app->/** @scrutinizer ignore-call */ runningInConsole()) {

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
            $this->commands([
0 ignored issues
show
Bug introduced by
The method commands() does not exist on Ikechukwukalu\Databaseba...seBackupServiceProvider. ( Ignorable by Annotation )

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

20
            $this->/** @scrutinizer ignore-call */ 
21
                   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...
21
                DatabaseBackupCommand::class
22
            ]);
23
        }
24
25
        $this->publishes([
0 ignored issues
show
Bug introduced by
The method publishes() does not exist on Ikechukwukalu\Databaseba...seBackupServiceProvider. ( Ignorable by Annotation )

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

25
        $this->/** @scrutinizer ignore-call */ 
26
               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...
26
            self::CONFIG => config_path('databasebackup.php'),
27
        ], 'db-config');
28
    }
29
30
    /**
31
     * Register the application services.
32
     *
33
     * @return void
34
     */
35
    public function register()
36
    {
37
        //
38
        $this->mergeConfigFrom(
0 ignored issues
show
Bug introduced by
The method mergeConfigFrom() does not exist on Ikechukwukalu\Databaseba...seBackupServiceProvider. ( Ignorable by Annotation )

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

38
        $this->/** @scrutinizer ignore-call */ 
39
               mergeConfigFrom(

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...
39
            __DIR__.'/config/databasebackup.php', 'databasebackup'
40
        );
41
    }
42
}
43