Completed
Push — master ( 5b2a1a...c2fb62 )
by Andrii
02:13
created

AbstractMenu   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 19
c 0
b 0
f 0
ccs 0
cts 5
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 3
render() 0 1 ?
1
<?php
2
3
namespace hiqdev\thememanager\menus;
4
5
use Yii;
6
7
/**
8
 * Abstract Menu.
9
 *
10
 * @author Andrii Vasyliev <[email protected]>
11
 */
12
abstract class AbstractMenu implements MenuInterface
13
{
14
    /**
15
     * @inheritdoc
16
     */
17
    public static function create($config = [])
18
    {
19
        if (is_array($config) && empty($config['class'])) {
20
            $config['class'] = get_called_class();
21
        }
22
23
        return Yii::createObject($config);
24
    }
25
26
    /**
27
     * @inheritdoc
28
     */
29
    abstract public function render($options = []);
30
}
31