Passed
Branch 2.0.0-dev (2fd06c)
by Jeroen
02:36
created

TelephoneFormatter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getVcfString() 0 3 1
1
<?php
2
3
namespace JeroenDesloovere\VCard\Formatter\Property;
4
5
use JeroenDesloovere\VCard\Property\Telephone;
6
7
final class TelephoneFormatter implements NodeFormatterInterface
8
{
9
    /** @var Telephone */
10
    protected $telephone;
11
12
    public function __construct(Telephone $telephone)
13
    {
14
        $this->telephone = $telephone;
15
    }
16
17
    public function getVcfString(): string
18
    {
19
        return $this->telephone->getNode() . ';tel:' . $this->telephone->getValue();
20
    }
21
}
22