Completed
Push — 1.x ( 29da9d...c4a6b5 )
by Markus
03:09
created

Description::setValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 6
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of the eluceo/iCal package.
5
 *
6
 * (c) Markus Poerschke <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Eluceo\iCal\Property\Event;
13
14
use Eluceo\iCal\Property\ValueInterface;
15
use Eluceo\iCal\Util\PropertyValueUtil;
16
17
/**
18
 * Allows new line charectars to be in the description.
19
 */
20
class Description implements ValueInterface
21
{
22
    /**
23
     * The value.
24
     *
25
     * @var string
26
     */
27
    private $escapedValue;
28
29
    /**
30
     * @param string $value
31
     */
32 3
    public function __construct($value)
33
    {
34 3
        $this->escapedValue = PropertyValueUtil::escapeValue((string) $value);
35 3
    }
36
37
    /**
38
     * @inheritdoc
39
     */
40 3
    public function getEscapedValue()
41
    {
42 3
        return $this->escapedValue;
43
    }
44
}
45