Skip to content

Commit 1ca08c5

Browse files
authored
Merge pull request #1056 from PHPCSStandards/phpcs-4.0/feature/remove-more-output-buffering-from-config-2
Config: remove some more output buffering
2 parents 7b652df + 806b343 commit 1ca08c5

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Config.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -679,11 +679,8 @@ public function processShortArgument($arg, $pos)
679679
switch ($arg) {
680680
case 'h':
681681
case '?':
682-
ob_start();
683682
$this->printUsage();
684-
$output = ob_get_contents();
685-
ob_end_clean();
686-
throw new DeepExitException($output, 0);
683+
throw new DeepExitException('', 0);
687684
case 'i' :
688685
$output = Standards::prepareInstalledStandardsForDisplay().PHP_EOL;
689686
throw new DeepExitException($output, 0);
@@ -793,11 +790,8 @@ public function processLongArgument($arg, $pos)
793790
{
794791
switch ($arg) {
795792
case 'help':
796-
ob_start();
797793
$this->printUsage();
798-
$output = ob_get_contents();
799-
ob_end_clean();
800-
throw new DeepExitException($output, 0);
794+
throw new DeepExitException('', 0);
801795
case 'version':
802796
$output = 'PHP_CodeSniffer version '.self::VERSION.' ('.self::STABILITY.') ';
803797
$output .= 'by Squiz and PHPCSStandards'.PHP_EOL;

0 commit comments

Comments
 (0)