Completed
Push — master ( 8fae0f...b69ce8 )
by Taosikai
14:32
created

DashboardCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getChina() 0 7 2
1
<?php
2
/*
3
 * This file is part of the Slince/China package.
4
 *
5
 * (c) Slince <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace China\Command\Dashboard;
11
12
use China\China;
13
use Symfony\Component\Console\Command\Command;
14
15
class DashboardCommand extends Command
16
{
17
    /**
18
     * @var China
19
     */
20
    protected $china;
21
22
    /**
23
     * 获取china对象
24
     * @return China
25
     */
26
    protected function getChina()
27
    {
28
        if (is_null($this->china)) {
29
            $this->china = new China();
30
        }
31
        return $this->china;
32
    }
33
}