DetailedTheme::getAttributes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 4
cp 0
cc 1
nc 1
nop 0
crap 2
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