Completed
Push — master ( 390c8c...8b8bac )
by Бабичев
02:28
created

CData::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Bavix\XMLReader;
4
5
class CData
6
{
7
8
    /**
9
     * @var string 
10
     */
11
    protected $raw;
12
13
    /**
14
     * Raw constructor.
15
     *
16
     * @param string $raw
17
     */
18
    public function __construct(string $raw)
19
    {
20
        $this->raw = $raw;
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    public function __toString()
27
    {
28
        return '<![CDATA[ ' . $this->raw . ' ]]>';
29
    }
30
31
}
32