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

Theme   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 58
rs 10
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A isDefault() 0 4 1
1
<?php
2
3
namespace Yajra\CMS\Theme;
4
5
use Illuminate\Support\Fluent;
6
7
class Theme extends Fluent
8
{
9
    /**
10
     * @var string
11
     */
12
    public $name;
13
14
    /**
15
     * @var string
16
     */
17
    public $theme;
18
19
    /**
20
     * @var string
21
     */
22
    public $version;
23
24
    /**
25
     * @var string
26
     */
27
    public $description;
28
29
    /**
30
     * @var array
31
     */
32
    public $positions = [];
33
34
    /**
35
     * Theme constructor.
36
     *
37
     * @param string $name
38
     * @param string $theme
39
     * @param string $version
40
     * @param string $description
41
     * @param array $positions
42
     * @param array|object $attributes
43
     */
44
    public function __construct($name, $theme, $version, $description, array $positions, $attributes = [])
45
    {
46
        $this->name        = $name;
47
        $this->theme       = $theme;
48
        $this->version     = $version;
49
        $this->description = $description;
50
        $this->positions   = $positions;
51
52
        parent::__construct($attributes);
53
    }
54
55
    /**
56
     * Check if this team is the default theme.
57
     *
58
     * @return bool
59
     */
60
    public function isDefault()
61
    {
62
        return $this->theme == config('theme.frontend', 'default');
63
    }
64
}
65