Completed
Pull Request — develop (#27)
by Chris
13:09
created

AbstractPropertyMetadata::getProperty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Model\Mapping;
4
5
abstract class AbstractPropertyMetadata
6
{
7
    /**
8
     * @var ReflectionProperty
9
     */
10
    private $property;
11
12
    /**
13
     * @var string
14
     */
15
    private $name;
16
17
    /**
18
     * @var string
19
     */
20
    private $type;
21
22
    public function __construct(\ReflectionProperty $property, $name, $type = null)
23
    {
24
        $this->property = $property;
0 ignored issues
show
Documentation Bug introduced by
It seems like $property of type object<ReflectionProperty> is incompatible with the declared type object<Chrisyue\PhpM3u8\...ing\ReflectionProperty> of property $property.

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...
25
        $this->name = $name;
26
        $this->type = $type;
27
    }
28
29
    /**
30
     * @return ReflectionProperty
31
     */
32
    public function getProperty()
33
    {
34
        return $this->property;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getName()
41
    {
42
        return $this->name;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getType()
49
    {
50
        return $this->type;
51
    }
52
}
53