Passed
Push — master ( 7248a5...b30091 )
by Iman
02:11
created

EventSituations   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 3
dl 0
loc 17
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A hasMethod() 0 2 1
A whenYouReachCheckPoint() 0 3 1
A whenEventHappens() 0 3 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\WatchingStrategies\Events;
4
5
final class EventSituations
6
{
7 35
    public function hasMethod()
8
    {
9
10 35
    }
11
    /**
12
     * @param mixed ...$event
13
     */
14 11
    public function whenEventHappens(...$event)
15
    {
16 11
        resolve('heyman.chains')->init(EventManager::class, $event);
0 ignored issues
show
Bug introduced by
The method init() does not exist on Illuminate\Foundation\Application. ( Ignorable by Annotation )

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

16
        resolve('heyman.chains')->/** @scrutinizer ignore-call */ init(EventManager::class, $event);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
17 11
    }
18
19 1
    public function whenYouReachCheckPoint($name)
20
    {
21 1
        $this->whenEventHappens('heyman_checkpoint_'.$name);
22 1
    }
23
}
24