Completed
Pull Request — master (#391)
by Marco
07:35
created

MethodGenerator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromReflection() 0 9 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