Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.4326 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
74 | 3 | private function getCallback(OutputInterface $output = null) |
|
75 | { |
||
76 | 3 | $callback = null; |
|
77 | |||
78 | 3 | if ($output) { |
|
79 | 3 | $callback = function ($type, $buffer) use ($output) { |
|
80 | if (Process::ERR === $type) { |
||
81 | $output->writeln("<error>$buffer</error>"); |
||
82 | } else { |
||
83 | $output->writeln($buffer); |
||
84 | } |
||
85 | 3 | }; |
|
86 | 3 | } |
|
87 | |||
88 | 3 | return $callback; |
|
89 | } |
||
90 | } |
||
91 |