ConsoleBase   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 62.5%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 39
rs 10
c 0
b 0
f 0
ccs 5
cts 8
cp 0.625

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setApplication() 0 5 1
A getApplication() 0 4 1
1
<?php
2
3
namespace SilverLeague\Console\Framework;
4
5
use Symfony\Component\Console\Application;
6
7
/**
8
 * Forms the base for most Console classes to extend from. It is Application aware.
9
 *
10
 * @category silverstripe-console
11
 * @author   Robbie Averill <[email protected]>
12
 */
13
class ConsoleBase
14
{
15
    /**
16
     * The Symfony console application
17
     *
18
     * @var Application
19
     */
20
    protected $application;
21
22
    /**
23
     * @param Application $application
24
     */
25 4
    public function __construct(Application $application)
26
    {
27 4
        $this->application = $application;
28 4
    }
29
30
    /**
31
     * Set the Application
32
     *
33
     * @param  Application $application
34
     * @return $this
35
     */
36
    public function setApplication(Application $application)
37
    {
38
        $this->application = $application;
39
        return $this;
40
    }
41
42
    /**
43
     * Get the Symfony console Application
44
     *
45
     * @return Application
46
     */
47 4
    public function getApplication()
48
    {
49 4
        return $this->application;
50
    }
51
}
52