HandlersServiceProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 6
dl 0
loc 42
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 4 1
B boot() 0 29 1
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
}