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

EventSituations::normalize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 2
crap 2
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