Passed
Branch 2.0.0-dev (13f4c3)
by Jeroen
03:42
created

Url::getFormatter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
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\NodeFormatterInterface;
8
use JeroenDesloovere\VCard\Formatter\Property\UrlFormatter;
9
use JeroenDesloovere\VCard\Parser\Property\NodeParserInterface;
10
use JeroenDesloovere\VCard\Parser\Property\UrlParser;
11
use JeroenDesloovere\VCard\Property\Value\StringValue;
12
13
final class Url extends StringValue implements PropertyInterface, SimpleNodeInterface
14
{
15
    public function getFormatter(): NodeFormatterInterface
16
    {
17
        return new UrlFormatter($this);
18
    }
19
20
    public static function getNode(): string
21
    {
22
        return 'URL';
23
    }
24
25
    public static function getParser(): NodeParserInterface
26
    {
27
        return new UrlParser();
28
    }
29
30
    public function isAllowedMultipleTimes(): bool
31
    {
32
        return false;
33
    }
34
}
35