Completed
Push — master ( 47b0ab...ae4425 )
by Klochok
02:08
created

DetailedTheme::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace hiqdev\thememanager;
4
5
use yii\helpers\ArrayHelper;
6
7
class DetailedTheme
8
{
9
    protected $theme;
10
11
    public $description = 'description.md';
12
13
    public $license = 'license.md';
14
15
    public $readme = 'readme.md';
16
17
    public $author = 'author.md';
18
19
    public $images = [
20
        '1.jpg',
21
        '2.jpg',
22
        '3.jpg',
23
    ];
24
25
    public function __construct(Theme $theme)
26
    {
27
        $this->theme = $theme;
28
    }
29
30
    public function getAttributes()
31
    {
32
        return array_merge(ArrayHelper::toArray($this->theme), ArrayHelper::toArray($this));
33
    }
34
}
35