Skip to content
Permalink
Browse files

coding style

  • Loading branch information...
dg committed Feb 20, 2019
1 parent 13d79f0 commit 6ca248e9094a7da98ee2f77955379ada5cda5092
Showing with 33 additions and 33 deletions.
  1. +17 βˆ’17 src/Framework/DataProvider.php
  2. +16 βˆ’16 src/Runner/CliTester.php
@@ -77,23 +77,23 @@ public static function testQuery(string $input, string $query): bool
private static function compare($l, string $operator, $r): bool
{
switch ($operator) {
case '>':
return $l > $r;
case '=>':
case '>=':
return $l >= $r;
case '<':
return $l < $r;
case '=<':
case '<=':
return $l <= $r;
case '=':
case '==':
return $l == $r;
case '!':
case '!=':
case '<>':
return $l != $r;
case '>':
return $l > $r;
case '=>':
case '>=':
return $l >= $r;
case '<':
return $l < $r;
case '=<':
case '<=':
return $l <= $r;
case '=':
case '==':
return $l == $r;
case '!':
case '!=':
case '<>':
return $l != $r;
}
throw new \InvalidArgumentException("Unknown operator $operator.");
}
@@ -193,22 +193,22 @@ private function createRunner(): Runner
$runner->setTempDirectory($this->options['--temp']);
}
if ($this->options['-o'] !== 'none') {
switch ($this->options['-o']) {
case 'tap':
$runner->outputHandlers[] = new Output\TapPrinter;
break;
case 'junit':
$runner->outputHandlers[] = new Output\JUnitPrinter;
break;
default:
$runner->outputHandlers[] = new Output\ConsolePrinter(
$runner,
(bool) $this->options['-s'],
'php://output',
(bool) $this->options['--cider']
);
}
switch ($this->options['-o']) {
case 'none':
break;
case 'tap':
$runner->outputHandlers[] = new Output\TapPrinter;
break;
case 'junit':
$runner->outputHandlers[] = new Output\JUnitPrinter;
break;
default:
$runner->outputHandlers[] = new Output\ConsolePrinter(
$runner,
(bool) $this->options['-s'],
'php://output',
(bool) $this->options['--cider']
);
}
if ($this->options['--log']) {

0 comments on commit 6ca248e

Please sign in to comment.
You can’t perform that action at this time.