From c110003f8d5913416c489961ee168d453c511151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 7 Feb 2019 09:41:58 +0100 Subject: [PATCH] Fix: Do not reuse variable --- src/SpeedTrapListener.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SpeedTrapListener.php b/src/SpeedTrapListener.php index d3d532c..2ad0058 100644 --- a/src/SpeedTrapListener.php +++ b/src/SpeedTrapListener.php @@ -58,11 +58,11 @@ public function endTest(Test $test, float $time): void { if (!$test instanceof TestCase) return; - $time = $this->toMilliseconds($time); + $timeInMilliseconds = $this->toMilliseconds($time); $threshold = $this->getSlowThreshold($test); - if ($this->isSlow($time, $threshold)) { - $this->addSlowTest($test, $time); + if ($this->isSlow($timeInMilliseconds, $threshold)) { + $this->addSlowTest($test, $timeInMilliseconds); } }