Completed
Push — master ( bc8922...0303f9 )
by Emily
02:07
created

NamespaceBlock::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Spaark\CompositeUtils\Model\Reflection;
4
5
use Spaark\CompositeUtils\Model\Collection\Collection;
6
7
class NamespaceBlock extends Reflector
8
{
9
    /**
10
     * @var Collection
11
     * @readable
12
     */
13
    protected $definitions;
14
15
    /**
16
     * @var string
17
     * @readable
18
     */
19
    protected $namespace;
20
21
    /**
22
     * @var ReflectionFile
23
     * @readable
24
     */
25
    protected $file;
26
27
    /**
28
     * @var UseStatement[]
29
     * @readable
30
     */
31
    protected $useStatements;
32
33 6
    public function __construct(string $namespace)
34
    {
35 6
        $this->definitions = new Collection();
36 6
        $this->useStatements = new Collection();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \Spaark\CompositeUti...Collection\Collection() of type object<Spaark\CompositeU...\Collection\Collection> is incompatible with the declared type array<integer,object<Spa...flection\UseStatement>> of property $useStatements.

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...
37 6
        $this->namespace = $namespace;
38 6
    }
39
}
40