Passed
Push — new-api ( 42b595 )
by Sebastian
06:18
created

StyleSheet::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 5
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * citeproc-php
4
 *
5
 * @link        http://github.com/seboettg/citeproc-php for the source repository
6
 * @copyright   Copyright (c) 2016 Sebastian Böttger.
7
 * @license     https://opensource.org/licenses/MIT
8
 */
9
10
namespace Seboettg\CiteProc;
11
12
use Seboettg\CiteProc\Exception\CiteProcException;
13
use SimpleXMLElement;
14
15
/**
16
 * Class StyleSheet
17
 *
18
 * Wrapper for SimpleXMLElement
19
 *
20
 * @package Seboettg\CiteProc
21
 * @author Sebastian Böttger <[email protected]>
22
 */
23
class StyleSheet
24
{
25
    /** @var SimpleXMLElement */
26
    private $node;
27
28 167
    public function __construct($data, $options = 0, $data_is_url = false, $ns = "", $is_prefix = false)
0 ignored issues
show
Coding Style introduced by
Incorrect spacing between argument "$options" and equals sign; expected 0 but found 1
Loading history...
Coding Style introduced by
Incorrect spacing between default value and equals sign for argument "$options"; expected 0 but found 1
Loading history...
Coding Style introduced by
Incorrect spacing between argument "$data_is_url" and equals sign; expected 0 but found 1
Loading history...
Coding Style introduced by
Incorrect spacing between default value and equals sign for argument "$data_is_url"; expected 0 but found 1
Loading history...
Coding Style introduced by
Incorrect spacing between argument "$ns" and equals sign; expected 0 but found 1
Loading history...
Coding Style introduced by
Incorrect spacing between default value and equals sign for argument "$ns"; expected 0 but found 1
Loading history...
Coding Style introduced by
Incorrect spacing between argument "$is_prefix" and equals sign; expected 0 but found 1
Loading history...
Coding Style introduced by
Incorrect spacing between default value and equals sign for argument "$is_prefix"; expected 0 but found 1
Loading history...
29
    {
30 167
        $this->node = new SimpleXMLElement($data, $options, $data_is_url, $ns, $is_prefix);
31 167
    }
32
33 167
    public function __invoke()
34
    {
35 167
        return $this->node;
36
    }
37
}
38