RouteUrlSituationProvider   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
eloc 13
dl 0
loc 37
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getListener() 0 3 1
A getForgetMethods() 0 3 1
A getSituationProvider() 0 3 1
A getForgetKey() 0 3 1
A getMethods() 0 9 1
A getForgetArgs() 0 3 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\Plugins\WatchingStrategies\Routes;
4
5
use Imanghafoori\HeyMan\Contracts\ForgettableSituation;
6
7
class RouteUrlSituationProvider implements ForgettableSituation
8
{
9 121
    public function getListener()
10
    {
11 121
        return RouteEventListener::class;
12
    }
13
14 121
    public function getSituationProvider()
15
    {
16 121
        return RouteUrlsNormalizer::class;
17
    }
18
19 121
    public function getForgetKey()
20
    {
21 121
        return 'routeChecks';
22
    }
23
24 121
    public function getMethods()
25
    {
26
        return [
27 121
            'whenYouVisitUrl',
28
            'whenYouSendGet',
29
            'whenYouSendPost',
30
            'whenYouSendPatch',
31
            'whenYouSendPut',
32
            'whenYouSendDelete',
33
        ];
34
    }
35
36 14
    public static function getForgetMethods()
37
    {
38 14
        return ['aboutUrl'];
39
    }
40
41 1
    public static function getForgetArgs($method, $args)
42
    {
43 1
        return  $args = [RouteEventListener::class, resolve(RouteUrlsNormalizer::class)->normalize('get', $args)];
0 ignored issues
show
Unused Code introduced by
The assignment to $args is dead and can be removed.
Loading history...
44
    }
45
}
46