Passed
Branch 2.0.0-dev (fd104f)
by Jeroen
04:04
created

Role::getNode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace JeroenDesloovere\VCard\Property;
6
7
use JeroenDesloovere\VCard\Formatter\Property\RoleFormatter;
8
use JeroenDesloovere\VCard\Formatter\Property\NodeFormatterInterface;
9
use JeroenDesloovere\VCard\Parser\Property\RoleParser;
10
use JeroenDesloovere\VCard\Parser\Property\NodeParserInterface;
11
use JeroenDesloovere\VCard\Property\Value\StringValue;
12
13
final class Role extends StringValue implements PropertyInterface, SimpleNodeInterface
14
{
15
    public function getFormatter(): NodeFormatterInterface
16
    {
17
        return new RoleFormatter($this);
18
    }
19
20
    public static function getNode(): string
21
    {
22
        return 'ROLE';
23
    }
24
25
    public static function getParser(): NodeParserInterface
26
    {
27
        return new RoleParser();
28
    }
29
30
    public function isAllowedMultipleTimes(): bool
31
    {
32
        return false;
33
    }
34
}
35