RawXML::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
/*
3
 * This file is part of the Ariadne Component Library.
4
 *
5
 * (c) Muze <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace arc\xml;
12
13
/**
14
 * This is a container for raw xml content, which will not get escaped 
15
 * when included by the \arc\xml\Writer or NodeList.
16
 * @property string $contents
17
 */
18
class RawXML {
19
    public $contents = '';
20
21 6
    public function __construct($contents) 
22
    {
23 6
        $this->contents = $contents;
24 6
    }
25
26 6
    public function __toString()
27
    {
28 6
        return (string) $this->contents;
29
    }
30
}