DashboardCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getChina() 0 8 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
11
namespace China\Command\Dashboard;
12
13
use China\China;
14
use Symfony\Component\Console\Command\Command;
15
16
class DashboardCommand extends Command
17
{
18
    /**
19
     * @var China
20
     */
21
    protected $china;
22
23
    /**
24
     * 获取china对象
25
     *
26
     * @return China
27
     */
28
    protected function getChina()
29
    {
30
        if (is_null($this->china)) {
31
            $this->china = new China();
32
        }
33
34
        return $this->china;
35
    }
36
}