Completed
Push — master ( ac38d0...343642 )
by Marco
12s
created

MethodGenerator::fromReflection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 9
ccs 4
cts 4
cp 1
rs 9.6666
c 1
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManager\Generator;
6
7
use Zend\Code\Generator\MethodGenerator as ZendMethodGenerator;
8
use Zend\Code\Reflection\MethodReflection;
9
10
/**
11
 * Method generator that fixes minor quirks in ZF2's method generator
12
 *
13
 * @author Marco Pivetta <[email protected]>
14
 * @license MIT
15
 */
16
class MethodGenerator extends ZendMethodGenerator
17
{
18
    /**
19
     * {@inheritDoc}
20
     */
21 19
    public static function fromReflection(MethodReflection $reflectionMethod) : self
22
    {
23
        /* @var $method self */
24 19
        $method = parent::fromReflection($reflectionMethod);
25
26 19
        $method->setInterface(false);
27
28 19
        return $method;
29
    }
30
}
31