IOAware::setIO()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Cerbero\ConsoleTasker\Traits;
4
5
use Illuminate\Console\Concerns\InteractsWithIO;
6
use Illuminate\Console\OutputStyle;
7
use Symfony\Component\Console\Input\InputInterface;
8
9
/**
10
 * The I/O aware trait.
11
 *
12
 */
13
trait IOAware
14
{
15
    use InteractsWithIO;
16
17
    /**
18
     * Set console input and output.
19
     *
20
     * @param InputInterface $input
21
     * @param OutputStyle $output
22
     * @return self
23
     */
24
    public function setIO(InputInterface $input, OutputStyle $output): self
25
    {
26
        $this->setInput($input);
27
        $this->setOutput($output);
28
29
        return $this;
30
    }
31
}
32