Completed
Push — master ( 04ceba...2dddc8 )
by Andrii
03:10
created

Command   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHandler() 0 8 2
1
<?php
2
/**
3
 * HiAPI Yii2 base project for building API
4
 *
5
 * @link      https://github.com/hiqdev/hiapi
6
 * @package   hiapi
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiapi\commands;
12
13
use Yii;
14
15
class Command extends \yii\base\Model
16
{
17
    protected static $handler;
18
19
    public static function getHandler()
20
    {
21
        if (!is_object(static::$handler)) {
22
            static::$handler = Yii::createObject(static::$handler);
23
        }
24
25
        return static::$handler;
26
    }
27
}
28