PropertyMetadata   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 1
A getName() 0 4 1
A getType() 0 4 1
A getOptions() 0 4 1
A getRole() 0 4 1
A getClass() 0 4 1
A getGroup() 0 4 1
1
<?php
2
3
namespace Psi\Component\ContentType\Metadata;
4
5
use Metadata\PropertyMetadata as BasePropertyMetadata;
6
use Psi\Component\ContentType\FieldOptions;
7
8
class PropertyMetadata extends BasePropertyMetadata
9
{
10
    private $type;
11
    private $options;
12
    private $role;
13
    private $group;
14
15
    public function __construct(
16
        $class,
17
        $name,
18
        $type,
19
        $role,
20
        $group,
21
        array $options
22
    ) {
23
        parent::__construct($class, $name);
24
25
        $this->type = $type;
26
        $this->role = $role;
27
        $this->group = $group;
28
        $this->options = FieldOptions::create($options);
29
    }
30
31
    public function getName(): string
32
    {
33
        return $this->name;
34
    }
35
36
    public function getType(): string
37
    {
38
        return $this->type;
39
    }
40
41
    public function getOptions(): FieldOptions
42
    {
43
        return $this->options;
44
    }
45
46
    public function getRole()
47
    {
48
        return $this->role;
49
    }
50
51
    public function getClass(): string
52
    {
53
        return $this->class;
54
    }
55
56
    public function getGroup()
57
    {
58
        return $this->group;
59
    }
60
}
61