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

TelephoneFormatter::getVcfString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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