Blade::render()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 2
eloc 3
nc 2
nop 2
1
<?php 
2
3
namespace Helmut\Forms\Engines;
4
5
use Helmut\Forms\Engine;
6
7
class Blade implements Engine {
8
9
    /**
10
     * Render the template content.
11
     *
12
     * @param  string  $path
13
     * @param  array  $properties
14
     * @return string
15
     */
16
    public function render($path, $properties = []) 
17
    {
18
        if ( ! function_exists('app')) throw new \Exception('Laravel required for blade rendering engine.');
19
20
        return app()->make('view')->file($path, $properties);
21
    }
22
23
}
24