From a20fd07dd8169d5c9a65efc67f0801f4f78b612f Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Sat, 3 Aug 2024 13:33:00 +0200 Subject: [PATCH] General: Clean up use statements Reviewed at https://reviews.lunr.nl/r/1200/ --- src/Lunr/Halo/LegacyBaseTest.php | 7 +++---- src/Lunr/Halo/LunrBaseTest.php | 7 +++---- src/Lunr/Halo/Tests/LunrBaseTestTest.php | 1 - 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Lunr/Halo/LegacyBaseTest.php b/src/Lunr/Halo/LegacyBaseTest.php index 6cb78514..90caa3f9 100644 --- a/src/Lunr/Halo/LegacyBaseTest.php +++ b/src/Lunr/Halo/LegacyBaseTest.php @@ -10,12 +10,11 @@ namespace Lunr\Halo; +use Closure; use PHPUnit\Framework\TestCase; +use ReflectionClass; use ReflectionMethod; use ReflectionProperty; -use Throwable; -use Closure; -use ReflectionClass; use RuntimeException; /** @@ -491,7 +490,7 @@ protected function expectOutputMatchesFile(string $file): void $content = file_get_contents($file); if ($content === FALSE) { - throw new \RuntimeException("File \"$file\" could not be read!"); + throw new RuntimeException("File \"$file\" could not be read!"); } $this->expectOutputString($content); diff --git a/src/Lunr/Halo/LunrBaseTest.php b/src/Lunr/Halo/LunrBaseTest.php index 6b3821d0..ca174fbc 100644 --- a/src/Lunr/Halo/LunrBaseTest.php +++ b/src/Lunr/Halo/LunrBaseTest.php @@ -10,13 +10,12 @@ namespace Lunr\Halo; +use Closure; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +use ReflectionClass; use ReflectionMethod; use ReflectionProperty; -use Throwable; -use Closure; -use ReflectionClass; use RuntimeException; /** @@ -511,7 +510,7 @@ protected function expectOutputMatchesFile(string $file): void $content = file_get_contents($file); if ($content === FALSE) { - throw new \RuntimeException("File \"$file\" could not be read!"); + throw new RuntimeException("File \"$file\" could not be read!"); } $this->expectOutputString($content); diff --git a/src/Lunr/Halo/Tests/LunrBaseTestTest.php b/src/Lunr/Halo/Tests/LunrBaseTestTest.php index 93ce344a..a72a8e5f 100644 --- a/src/Lunr/Halo/Tests/LunrBaseTestTest.php +++ b/src/Lunr/Halo/Tests/LunrBaseTestTest.php @@ -11,7 +11,6 @@ namespace Lunr\Halo\Tests; use Lunr\Halo\LunrBaseTest; -use ReflectionClass; /** * This class contains the tests for the unit test base class.