These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /** |
||
4 | * This file is part of Zenify |
||
5 | * Copyright (c) 2014 Tomas Votruba (http://tomasvotruba.cz) |
||
6 | */ |
||
7 | |||
8 | namespace Zenify\DoctrineMigrations; |
||
9 | |||
10 | use Doctrine\DBAL\Migrations\OutputWriter as DoctrineOutputWriter; |
||
11 | use Symfony\Component\Console\Output\ConsoleOutput; |
||
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
12 | |||
13 | |||
14 | final class OutputWriter extends DoctrineOutputWriter |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * @var ConsoleOutput |
||
19 | */ |
||
20 | private $consoleOutput; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 2 | public function write($message) |
|
27 | { |
||
28 | 2 | $this->getConsoleOutput()->writeln($message); |
|
29 | 2 | } |
|
30 | |||
31 | |||
32 | /** |
||
33 | * @return ConsoleOutput |
||
34 | */ |
||
35 | 2 | private function getConsoleOutput() |
|
36 | { |
||
37 | 2 | if ($this->consoleOutput === NULL) { |
|
38 | 2 | $this->consoleOutput = new ConsoleOutput; |
|
39 | 2 | } |
|
40 | 2 | return $this->consoleOutput; |
|
41 | } |
||
42 | |||
43 | } |
||
44 |