EventServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 18
ccs 0
cts 4
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 2
1
<?php
2
3
namespace Terranet\Administrator\Providers;
4
5
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
6
use Illuminate\Foundation\Support\Providers\EventServiceProvider as AppEventServiceProvider;
0 ignored issues
show
Bug introduced by
The type Illuminate\Foundation\Su...rs\EventServiceProvider was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class EventServiceProvider extends AppEventServiceProvider
9
{
10
    protected $handlers = [
11
        \Terranet\Administrator\Providers\Handlers\PasswordsManager::class,
12
        \Terranet\Administrator\Providers\Handlers\RouteManager::class,
13
    ];
14
15
    /**
16
     * Register any other events for your application.
17
     *
18
     * @param \Illuminate\Contracts\Events\Dispatcher $events
19
     */
20
    public function boot(DispatcherContract $events = null)
21
    {
22
        parent::boot($events);
23
24
        foreach ($this->handlers as $handler) {
25
            app($handler)->handle();
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

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

25
            /** @scrutinizer ignore-call */ 
26
            app($handler)->handle();
Loading history...
26
        }
27
    }
28
}
29