Completed
Push — master ( d10f54...00ced4 )
by
unknown
05:32
created

ReflectionMethodAnalyzer   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0
ccs 5
cts 5
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A analyze() 0 12 2
1
<?php declare(strict_types = 1);
2
/**
3
 * Created by Ruslan Molodyko.
4
 * Date: 10.09.2016
5
 * Time: 15:33
6
 */
7
namespace samsonframework\container\definition\analyzer\reflection;
8
9
use samsonframework\container\definition\analyzer\DefinitionAnalyzer;
10
use samsonframework\container\definition\analyzer\MethodAnalyzerInterface;
11
use samsonframework\container\definition\ClassDefinition;
12
use samsonframework\container\definition\MethodDefinition;
13
14
/**
15
 * Class ReflectionMethodAnalyzer
16
 *
17
 * @author Ruslan Molodyko <[email protected]>
18
 */
19
class ReflectionMethodAnalyzer implements MethodAnalyzerInterface
20
{
21
    /** {@inheritdoc} */
22 6
    public function analyze(
23
        DefinitionAnalyzer $analyzer,
24
        \ReflectionMethod $reflectionMethod,
25
        ClassDefinition $classDefinition,
26
        MethodDefinition $methodDefinition = null
27
    ) {
28 6
        if ($methodDefinition) {
29
            // Set method metadata
30 6
            $methodDefinition->setModifiers($reflectionMethod->getModifiers());
31 6
            $methodDefinition->setIsPublic($reflectionMethod->isPublic());
32
        }
33 6
    }
34
}
35