Refactor some code

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2018-08-21 09:51:05 +02:00
parent 2bab916c53
commit 20839a422b
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 4 additions and 15 deletions

View File

@ -108,7 +108,10 @@ class Application {
} }
if ($this->memoryInfo->isMemoryLimitSufficient() === false) { if ($this->memoryInfo->isMemoryLimitSufficient() === false) {
$this->writeMemoryLimitInfo($output); $output->getErrorOutput()->writeln(
'<comment>The current PHP memory limit ' .
'is below the recommended value of 512MB.</comment>'
);
} }
try { try {
@ -187,20 +190,6 @@ class Application {
} }
} }
/**
* Write a memory info output if the limit is below the recommended value.
*
* @param ConsoleOutputInterface $output
* @return void
*/
private function writeMemoryLimitInfo(ConsoleOutputInterface $output) {
$errOutput = $output->getErrorOutput();
$errOutput->writeln(
'<comment>The current PHP memory limit ' .
'is below the recommended value of 512MB.</comment>'
);
}
/** /**
* Sets whether to automatically exit after a command execution or not. * Sets whether to automatically exit after a command execution or not.
* *