Skip to content

Commit

Permalink
Apply cs-fixer to the TeamCity logger
Browse files Browse the repository at this point in the history
  • Loading branch information
wbars authored and sebastianbergmann committed Aug 13, 2018
1 parent 848314a commit 8862e7b
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/Util/Log/TeamCity.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public function addError(Test $test, \Throwable $t, float $time): void
$this->printEvent(
'testFailed',
[
'name' => $test->getName(),
'message' => self::getMessage($t),
'details' => self::getDetails($t),
'name' => $test->getName(),
'message' => self::getMessage($t),
'details' => self::getDetails($t),
'duration' => self::toMilliseconds($time),
]
);
Expand All @@ -78,9 +78,9 @@ public function addWarning(Test $test, Warning $e, float $time): void
$this->printEvent(
'testFailed',
[
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
]
);
Expand All @@ -94,9 +94,9 @@ public function addWarning(Test $test, Warning $e, float $time): void
public function addFailure(Test $test, AssertionFailedError $e, float $time): void
{
$parameters = [
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
];

Expand Down Expand Up @@ -168,9 +168,9 @@ public function printIgnoredTest($testName, \Throwable $t, float $time): void
$this->printEvent(
'testIgnored',
[
'name' => $testName,
'message' => self::getMessage($t),
'details' => self::getDetails($t),
'name' => $testName,
'message' => self::getMessage($t),
'details' => self::getDetails($t),
'duration' => self::toMilliseconds($time),
]
);
Expand Down Expand Up @@ -384,7 +384,8 @@ private static function getFileName($className): string
/**
* @param float $time microseconds
*/
private static function toMilliseconds(float $time): int {
return round($time * 1000);
private static function toMilliseconds(float $time): int
{
return \round($time * 1000);
}
}

0 comments on commit 8862e7b

Please sign in to comment.