Completed
Push — master ( ec5252...14dc0c )
by Vitaly
02:23
created

Alias   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 66.67%

Importance

Changes 3
Bugs 0 Features 2
Metric Value
wmc 1
c 3
b 0
f 2
lcom 1
cbo 2
dl 0
loc 9
ccs 2
cts 3
cp 0.6667
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A toClassMetadata() 0 5 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: root
5
 * Date: 02.08.16
6
 * Time: 1:59.
7
 */
8
namespace samsonframework\container\annotation;
9
10
use samsonframework\container\metadata\ClassMetadata;
11
12
/**
13
 * Class Alias.
14
 *
15
 * @Annotation
16
 */
17
class Alias extends AnnotationWithValue implements ClassInterface
18
{
19
    /** {@inheritdoc} */
20 1
    public function toClassMetadata(ClassMetadata $classMetadata)
21
    {
22
        // Add all found annotation collection to metadata collection
23 1
        $classMetadata->alias = array_merge($classMetadata->alias, $this->collection);
0 ignored issues
show
Documentation Bug introduced by
It seems like array_merge($classMetada...ias, $this->collection) of type array<integer,string> is incompatible with the declared type string of property $alias.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
24
    }
25
}
26