ConsoleBase::getApplication()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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