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

View   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 24
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

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