GraphNode::__construct()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
nc 4
nop 3
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
1
<?php
2
3
namespace Novaway\Component\OpenGraph\Annotation;
4
5
abstract class GraphNode
6
{
7
    /** @var string */
8
    public $namespace;
9
10
    /** @var string */
11
    public $namespaceUri;
12
13
    /** @var string */
14
    public $tag;
15
16
    /** @var string */
17
    public $value;
18
19
20
    /**
21
     * Constructor
22
     *
23
     * @param string $namespace
24
     * @param string $tag
25
     * @param array  $values
26
     */
27
    public function __construct($namespace, $tag, array $values = [])
28
    {
29
        $this->namespace = $namespace;
30
        $this->tag       = $tag;
31
32
        if (isset($values['namespaceUri'])) {
33
            $this->namespaceUri = $values['namespaceUri'];
34
        }
35
36
        if (isset($values['value'])) {
37
            $this->value = $values['value'];
38
        }
39
    }
40
}
41