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

AbstractPropertyMetadata   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 48
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getProperty() 0 4 1
A getName() 0 4 1
A getType() 0 4 1
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