Passed
Branch master (e714e6)
by Gabriel
13:58 queued 11:36
created

XML   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 20
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 4 1
A instance() 0 7 2
1
<?php
2
3
namespace Nip\View;
4
5
use Nip\View;
6
7
class XML extends View
8
{
9
    public function load($view = false, $variables = array(), $return = false)
10
    {
11
        header('Content-type: text/xml');
12
        return parent::load($view, $variables, $return);
13
    }
14
15
    /**
16
     * Singleton
17
     *
18
     * @return self
19
     */
20
    public static function instance()
21
    {
22
        static $instance;
23
        if (!($instance instanceof self)) {
24
            $instance = new self();
25
        }
26
        return $instance;
27
    }
28
}
29