Completed
Push — master ( c92e65...c6e439 )
by Freek
01:30 queued 10s
created

BladeViewComponent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 15
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toHtml() 0 4 1
1
<?php
2
3
namespace Spatie\BladeX;
4
5
use Illuminate\Contracts\Support\Htmlable;
6
use Illuminate\View\View;
7
8
class BladeViewComponent implements Htmlable
9
{
10
    /** @var \Illuminate\View\View */
11
    protected $view;
12
13
    public function __construct(View $view)
14
    {
15
        $this->view = $view;
16
    }
17
18
    public function toHtml()
19
    {
20
        return $this->view->render();
21
    }
22
}