SymfonyOutput::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Artisanize\Output;
4
5
use Symfony\Component\Console\Output\OutputInterface;
6
7
class SymfonyOutput extends Output
8
{
9
    /**
10
     * Symfony command output.
11
     *
12
     * @var OutputInterface
13
     */
14
    protected $output;
15
16
    /**
17
     * Construct.
18
     *
19
     * @param OutputInterface $output
20
     */
21
    public function __construct(OutputInterface $output)
22
    {
23
        $this->output = $output;
24
    }
25
26
    /**
27
     * Write a message.
28
     *
29
     * @param string $message
30
     */
31
    public function write($message)
32
    {
33
        if ($this->verbosity) {
34
            $this->output->writeln($message);
35
        }
36
    }
37
38
    /**
39
     * Get the Symfony output class.
40
     *
41
     * @return OutputInterface
42
     */
43
    public function getOutput()
44
    {
45
        return $this->output;
46
    }
47
}
48