Skip to content

Commit

Permalink
coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 27, 2019
1 parent 2730ed9 commit ee525b7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
34 changes: 17 additions & 17 deletions src/Framework/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down
32 changes: 16 additions & 16 deletions src/Runner/CliTester.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand Down

0 comments on commit ee525b7

Please sign in to comment.