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

DetailedTheme   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 28
ccs 0
cts 2
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAttributes() 0 4 1
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