Completed
Push — master ( 6ae4bd...3df790 )
by Bukashk0zzz
01:13
created

Cdata::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Bukashk0zzzYmlGenerator
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Bukashk0zzz\YmlGenerator;
11
12
/**
13
 * Represents a value that should be written to XML as CDATA
14
 * @author zyura (https://github.com/zyura)
15
 */
16
class Cdata
17
{
18
    /**
19
     * @var string
20
     */
21
    private $value;
22
23
    /**
24
     * @param string $value
25
     */
26
    public function __construct($value)
27
    {
28
        $this->value = $value;
29
    }
30
31
    /**
32
     * Allows to get the wrapped value by casting an instance to string
33
     *
34
     * @return string
35
     */
36
    public function __toString()
37
    {
38
        return $this->value;
39
    }
40
}
41