DetailedTheme   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 30
rs 10
c 0
b 0
f 0
ccs 0
cts 8
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAttributes() 0 4 1
1
<?php
2
/**
3
 * Pluggable themes for Yii2
4
 *
5
 * @link      https://github.com/hiqdev/yii2-thememanager
6
 * @package   yii2-thememanager
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\thememanager;
12
13
use yii\helpers\ArrayHelper;
14
15
class DetailedTheme
16
{
17
    protected $theme;
18
19
    public $description = '/assets/description.md';
20
21
    public $license = 'MIT License';
22
23
    public $licenseText = '/assets/license.md';
24
25
    public $readme = '/assets/readme.md';
26
27
    public $author = '/assets/author.md';
28
29
    public $images = [
30
        '/assets/screenshots/1.png',
31
        '/assets/screenshots/2.png',
32
        '/assets/screenshots/3.png',
33
    ];
34
35
    public function __construct(Theme $theme)
36
    {
37
        $this->theme = $theme;
38
    }
39
40
    public function getAttributes()
41
    {
42
        return array_merge(ArrayHelper::toArray($this->theme), ArrayHelper::toArray($this));
43
    }
44
}
45