Passed
Push — master ( 47699c...d74cf0 )
by Rougin
01:47
created

View::accessor()   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.037

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 3
cp 0.6667
crap 1.037
rs 10
1
<?php
2
3
namespace App\Facades;
4
5
use Zapheus\Renderer\RendererInterface;
6
7
/**
8
 * View Facade
9
 *
10
 * @package App
11
 * @author  Rougin Royce Gutib <[email protected]>
12
 */
13
class View extends Facade
14
{
15
    /**
16
     * Returns the registered name of the instance.
17
     *
18
     * @return string
19
     */
20 6
    protected static function accessor()
21
    {
22 6
        return 'Zapheus\Renderer\RendererInterface';
23
    }
24
25
    /**
26
     * Renders a file from a specified template.
27
     *
28
     * @param  string $template
29
     * @param  array  $data
30
     * @return string
31
     *
32
     * @throws \InvalidArgumentException
33
     */
34 6
    public static function make($template, $data = array())
35
    {
36 6
        return self::render($template, $data);
0 ignored issues
show
Bug introduced by
The method render() does not exist on App\Facades\View. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

36
        return self::/** @scrutinizer ignore-call */ render($template, $data);
Loading history...
37
    }
38
}
39