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

AttributeMetadata::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 3
1
<?php
2
3
namespace Chrisyue\PhpM3u8\Model\Mapping;
4
5
use Chrisyue\PhpM3u8\Model\Util\StringUtil;
6
7
class AttributeMetadata extends AbstractPropertyMetadata
8
{
9
    public function __construct(\ReflectionProperty $property, $name = null, $type = null)
10
    {
11
        if (null === $name) {
12
            $name = (string) StringUtil::propertyToAttribute($property->getName());
13
        }
14
        parent::__construct($property, $name, $type);
15
    }
16
}
17