Completed
Push — master ( 6200b5...f6f2cd )
by Andrew
03:06
created

HandleMethodInflector::inflect()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2.032

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 10
ccs 4
cts 5
cp 0.8
rs 9.4285
cc 2
eloc 5
nc 2
nop 2
crap 2.032
1
<?php namespace Cairns\Radiate\Inflector;
2
3
final class HandleMethodInflector implements MethodInflector
4
{
5 3
    public function inflect($event, $listener)
6
    {
7 3
        $method = 'handle';
8
9 3
        if (! method_exists($listener, $method)) {
10
            return null;
11
        }
12
13 3
        return $method;
14
    }
15
}
16