HandlersServiceProvider::boot()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 29
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 29
rs 8.8571
c 1
b 0
f 0
cc 1
eloc 15
nc 1
nop 0
1
<?php
2
3
namespace GolfLeague\Handlers;
4
5
use Illuminate\Support\ServiceProvider;
6
7
class HandlersServiceProvider extends ServiceProvider
8
{
9
    public function register()
10
    {
11
12
    }
13
14
    /**
15
     * Boot the Handler Events
16
     *
17
     * @return void
18
     */
19
    public function boot()
20
    {
21
        $this->app->events->subscribe(
22
            new MatchHandler(
23
                $this->app->make('GolfLeague\Storage\Round\RoundRepository')
24
            )
25
        );
26
27
        $this->app->events->subscribe(
28
            new RoundHandler(
29
                $this->app->make('GolfLeague\Storage\HoleScore\HoleScoreRepository')
30
            )
31
        );
32
33
        $this->app->events->subscribe(
34
            new FinalizeHandler(
35
                $this->app->make('GolfLeague\Storage\Round\RoundRepository')
36
            )
37
        );
38
39
        $this->app->events->subscribe(
40
            new HoleScoreHandler(
41
                $this->app->make('GolfLeague\Storage\Round\RoundRepository'),
42
                $this->app->make('GolfLeague\Storage\HoleScore\HoleScoreRepository'),
43
                $this->app->make('GolfLeague\EquitableStrokeControl')
0 ignored issues
show
Unused Code introduced by
The call to HoleScoreHandler::__construct() has too many arguments starting with $this->app->make('GolfLe...quitableStrokeControl').

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
44
            )
45
        );
46
47
    }
48
}