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

BladeViewComponent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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
}