Completed
Push — master ( 05902f...9e6322 )
by mark
01:41 queued 11s
created

AbstractTemplateCreation::setInput()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace Phinx\Migration;
9
10
use Symfony\Component\Console\Input\InputInterface;
11
use Symfony\Component\Console\Output\OutputInterface;
12
13
abstract class AbstractTemplateCreation implements CreationInterface
14
{
15
    /**
16
     * @var \Symfony\Component\Console\Input\InputInterface
17
     */
18
    protected $input;
19
20
    /**
21
     * @var \Symfony\Component\Console\Output\OutputInterface
22
     */
23
    protected $output;
24
25
    /**
26
     * @param \Symfony\Component\Console\Input\InputInterface|null $input Input
27
     * @param \Symfony\Component\Console\Output\OutputInterface|null $output Output
28
     */
29 View Code Duplication
    public function __construct(InputInterface $input = null, OutputInterface $output = null)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
30
    {
31
        if ($input !== null) {
32
            $this->setInput($input);
33
        }
34
        if ($output !== null) {
35
            $this->setOutput($output);
36
        }
37
    }
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function getInput()
43
    {
44
        return $this->input;
45
    }
46
47
    /**
48
     * @inheritDoc
49
     */
50
    public function setInput(InputInterface $input)
51
    {
52 6
        $this->input = $input;
53
54 6
        return $this;
55 6
    }
56 6
57 6
    /**
58 6
     * @inheritDoc
59 6
     */
60 6
    public function getOutput()
61
    {
62
        return $this->output;
63
    }
64
65
    /**
66
     * @inheritDoc
67
     */
68
    public function setOutput(OutputInterface $output)
69
    {
70
        $this->output = $output;
71
72
        return $this;
73 6
    }
74
}
75