Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
27 | public function applyToCallback(\Closure $callback) |
||
28 | { |
||
29 | $verbosityLevel = OutputUtils::resetVerbosity( |
||
30 | $this->appIO, |
||
31 | OutputInterface::VERBOSITY_QUIET |
||
32 | ); |
||
33 | |||
34 | try { |
||
35 | $result = $callback(); |
||
36 | } catch (\Exception $exception) { |
||
37 | OutputUtils::resetVerbosity($this->appIO, $verbosityLevel); |
||
38 | |||
39 | throw $exception; |
||
40 | } |
||
41 | |||
42 | OutputUtils::resetVerbosity($this->appIO, $verbosityLevel); |
||
43 | |||
44 | return $result; |
||
45 | } |
||
47 |