Completed
Push — master ( e3abc3...de8d79 )
by Freek
02:03 queued 29s
created

BladeViewComponent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

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