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

DashboardCommand::getChina()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
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
}