UserLoginLogServiceProvider::register()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Moecasts\Laravel\UserLoginLog;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class UserLoginLogServiceProvider extends ServiceProvider
8
{
9
    /**
10
     * Register services.
11
     *
12
     * @return void
13
     */
14
    public function register()
15
    {
16
        $this->mergeConfigFrom(
0 ignored issues
show
Bug introduced by
The method mergeConfigFrom() does not exist on Moecasts\Laravel\UserLog...LoginLogServiceProvider. ( Ignorable by Annotation )

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

16
        $this->/** @scrutinizer ignore-call */ 
17
               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...
17
            \dirname(__DIR__) . '/config/loginlog.php',
18
            'loginlog'
19
        );
20
    }
21
22
    /**
23
     * Bootstrap services.
24
     *
25
     * @return void
26
     */
27
    public function boot()
28
    {
29
        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

29
        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...
30
            return;
31
        }
32
33
        if (\function_exists('config_path')) {
34
            $this->publishes([
0 ignored issues
show
Bug introduced by
The method publishes() does not exist on Moecasts\Laravel\UserLog...LoginLogServiceProvider. ( Ignorable by Annotation )

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

34
            $this->/** @scrutinizer ignore-call */ 
35
                   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...
35
              __DIR__ . '/../config/loginlog.php' => config_path('loginlog.php')
36
            ], 'laravel-user-login-log-config');
37
        }
38
39
        $this->publishes([
40
            __DIR__ . '/../database/migrations' => database_path('migrations'),
41
        ], 'laravel-user-login-log-migrations');
42
    }
43
}
44