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

StyleSheet   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 1
A __construct() 0 3 1
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