Completed
Push — master ( a22bfe...2e3ab0 )
by Mike
02:35
created

GenericNode::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of phpDocumentor.
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @link https://phpdoc.org
12
 */
13
14
namespace phpDocumentor\Guides\Nodes;
15
16
final class GenericNode extends Node
17
{
18
    /** @var string */
19
    private $name;
20
21
    /**
22
     * @param Node|callable|string|null $value
23
     */
24
    public function __construct(string $name, $value = null)
25
    {
26
        $this->name = $name;
27
28
        parent::__construct($value);
29
    }
30
31
    public function getName() : string
32
    {
33
        return $this->name;
34
    }
35
}
36