LumenQueryDetectorServiceProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 11 1
1
<?php
2
namespace BeyondCode\QueryDetector;
3
4
use Illuminate\Support\ServiceProvider;
5
6
class LumenQueryDetectorServiceProvider extends ServiceProvider
7
{
8
9
    public function register()
10
    {
11
        $this->app->configure('querydetector');
0 ignored issues
show
Bug introduced by
The method configure() does not exist on Illuminate\Contracts\Foundation\Application. Did you maybe mean configPath()? ( Ignorable by Annotation )

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

11
        $this->app->/** @scrutinizer ignore-call */ 
12
                    configure('querydetector');

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...
12
        $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'querydetector');
13
14
        $this->app->middleware([
0 ignored issues
show
Bug introduced by
The method middleware() does not exist on Illuminate\Contracts\Fou...ion\CachesConfiguration. ( Ignorable by Annotation )

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

14
        $this->app->/** @scrutinizer ignore-call */ 
15
                    middleware([

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...
Bug introduced by
The method middleware() does not exist on Illuminate\Contracts\Foundation\Application. ( Ignorable by Annotation )

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

14
        $this->app->/** @scrutinizer ignore-call */ 
15
                    middleware([

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...
15
            QueryDetectorMiddleware::class
16
        ]);
17
18
        $this->app->singleton(QueryDetector::class);
19
        $this->app->alias(QueryDetector::class, 'querydetector');
20
    }
21
}
22