Blade::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 7
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Yajra\CMS\Widgets;
4
5
use Arrilot\Widgets\AbstractWidget;
6
7 View Code Duplication
class Blade extends AbstractWidget
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    /**
10
     * The configuration array.
11
     *
12
     * @var array
13
     */
14
    protected $config = [];
15
16
    /**
17
     * Treat this method as a controller action.
18
     * Return view() or other content to display.
19
     *
20
     * @param \Yajra\CMS\Entities\Widget $widget
21
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
22
     */
23
    public function run($widget)
24
    {
25
        return view($widget->present()->template(), [
26
            'config' => $this->config,
27
            'widget' => $widget,
28
        ]);
29
    }
30
}
31