Completed
Push — master ( 0ab6a2...d8ddb3 )
by Robbie
01:17
created

AbstractTaskCommand::setTask()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace SilverLeague\Console\Command\Dev\Tasks;
4
5
use SilverLeague\Console\Command\SilverStripeCommand;
6
use SilverStripe\Dev\BuildTask;
7
8
/**
9
 * Not an actual abstract class, but used by the Command Factory to create Commands from BuildTasks
10
 *
11
 * @package silverstripe-console
12
 * @author  Robbie Averill <[email protected]>
13
 */
14
class AbstractTaskCommand extends SilverStripeCommand
15
{
16
    /**
17
     * Contains the SilverStripe BuildTask used for this command, if imported from SilverStripe
18
     *
19
     * @var BuildTask
20
     */
21
    protected $buildTask;
22
23
    /**
24
     * Get the original SilverStrpe BuildTask used
25
     *
26
     * @return BuildTask
27
     */
28
    public function getTask()
29
    {
30
        return $this->buildTask;
31
    }
32
33
    /**
34
     * Set the original SilverStripe BuildTask used
35
     *
36
     * @param  BuildTask $task
37
     * @return $this
38
     */
39 2
    public function setTask(BuildTask $task)
40
    {
41 2
        $this->buildTask = $task;
42 2
        return $this;
43
    }
44
}
45