Completed
Push — master ( 16ebaf...a3d07b )
by Arjay
14:09
created

Widget::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 5
c 1
b 0
f 1
nc 1
nop 4
dl 0
loc 7
rs 9.4285
1
<?php
2
3
namespace Yajra\CMS\Widgets;
4
5
class Widget
6
{
7
    /**
8
     * Widget name.
9
     *
10
     * @var string
11
     */
12
    public $name;
13
14
    /**
15
     * FQCN of the widget.
16
     *
17
     * @var string
18
     */
19
    public $class;
20
21
    /**
22
     * Lists of blade templates.
23
     *
24
     * @var array
25
     */
26
    public $templates = [];
27
28
    /**
29
     * Widget description.
30
     *
31
     * @var string
32
     */
33
    public $description;
34
35
    /**
36
     * Widget constructor.
37
     *
38
     * @param string $name
39
     * @param string $description
40
     * @param string $classPath
41
     * @param array $templates
42
     */
43
    public function __construct($name, $description, $classPath, array $templates)
44
    {
45
        $this->name        = $name;
46
        $this->description = $description;
47
        $this->class       = $classPath;
48
        $this->templates   = $templates;
49
    }
50
}
51