Passed
Push — master ( 1101f9...032f70 )
by Iman
02:45
created

HeyMan   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 34
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A normalizeInput() 0 3 2
A __construct() 0 3 1
A turnOff() 0 3 1
A turnOn() 0 3 1
1
<?php
2
3
namespace Imanghafoori\HeyMan;
4
5
use Imanghafoori\HeyMan\Hooks\EloquentHooks;
6
use Imanghafoori\HeyMan\Hooks\EventHooks;
7
use Imanghafoori\HeyMan\Hooks\RouteHooks;
8
use Imanghafoori\HeyMan\Hooks\ViewHooks;
9
10
class HeyMan
11
{
12
    use EloquentHooks, RouteHooks, ViewHooks, EventHooks;
13
14
    private $chain;
15
16
    /**
17
     * HeyMan constructor.
18
     *
19
     * @param \Imanghafoori\HeyMan\Chain $chain
20
     */
21 87
    public function __construct(Chain $chain)
22
    {
23 87
        $this->chain = $chain;
24 87
    }
25
26
    /**
27
     * @param $url
28
     *
29
     * @return array
30
     */
31 87
    private function normalizeInput(array $url): array
0 ignored issues
show
Unused Code introduced by
The method normalizeInput() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
32
    {
33 87
        return is_array($url[0]) ? $url[0] : $url;
34
    }
35
36 15
    public function turnOff(): Consider
37
    {
38 15
        return new Consider('turnOff');
39
    }
40
41 1
    public function turnOn(): Consider
42
    {
43 1
        return new Consider('turnOn');
44
    }
45
}
46