Passed
Push — master ( 99eb02...369f6b )
by Iman
02:44
created

EventSituations::whenEventHappens()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\WatchingStrategies\Events;
4
5
final class EventSituations
6
{
7
    /**
8
     * @param $method
9
     * @param $name
10
     *
11
     * @return mixed
12
     */
13 11
    public function normalize($method, $name)
14
    {
15 11
        if ($method == 'whenYouReachCheckPoint') {
16 1
            $name[0] = 'heyman_checkpoint_'.$name[0];
17
        }
18
19 11
        return [$name];
20
    }
21
}
22