Completed
Push — master ( 45e4bb...77f533 )
by Ben
02:24
created

WidgetFactory::asExpression()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Benrowe\Laravel\Widgets\Factories;
4
5
use Arrilot\Widgets\Factories\WidgetFactory as BaseWidgetFactory;
6
use Benrowe\Laravel\Widgets\Expression;
7
use Benrowe\Laravel\Widgets\Traits\BeginEndFactory;
8
9
/**
10
 *
11
 *
12
 * @package Benrowe\Laravel\Widgets
13
 */
14
class WidgetFactory extends BaseWidgetFactory
15
{
16
    use BeginEndFactory;
17
18
    /**
19
     * Convert the outputted html to an expression
20
     *
21
     * @param  string $html
22
     * @return Expression
23
     */
24
    protected function asExpression($html)
25
    {
26
        return new Expression($html, $this->widget);
27
    }
28
}
29