Passed
Push — master ( d74cf0...1b179d )
by Rougin
02:10
created

View::make()   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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
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
 * @method string render(string $template, array $data)
14
 */
15
class View extends Facade
16
{
17
    /**
18
     * Returns the registered name of the instance.
19
     *
20
     * @return string
21
     */
22 9
    protected static function accessor()
23
    {
24 9
        return 'Zapheus\Renderer\RendererInterface';
25
    }
26
27
    /**
28
     * Renders a file from a specified template.
29
     *
30
     * @param  string $template
31
     * @param  array  $data
32
     * @return string
33
     *
34
     * @throws \InvalidArgumentException
35
     */
36 9
    public static function make($template, $data = array())
37
    {
38 9
        return self::render($template, $data);
0 ignored issues
show
Bug Best Practice introduced by
The method App\Facades\View::render() is not static, but was called statically. ( Ignorable by Annotation )

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

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