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

AttributeMetadata   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
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