diff --git a/src/Actions/LoadStructure.php b/src/Actions/LoadStructure.php index 0aafee88..e065dc09 100644 --- a/src/Actions/LoadStructure.php +++ b/src/Actions/LoadStructure.php @@ -5,7 +5,9 @@ declare(strict_types=1); namespace Pest\Actions; use Pest\Support\Str; + use function Pest\testDirectory; + use PHPUnit\Util\FileLoader; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; diff --git a/src/Laravel/Commands/PestDatasetCommand.php b/src/Laravel/Commands/PestDatasetCommand.php index e5cab365..399611e1 100644 --- a/src/Laravel/Commands/PestDatasetCommand.php +++ b/src/Laravel/Commands/PestDatasetCommand.php @@ -8,7 +8,9 @@ use Illuminate\Console\Command; use Illuminate\Support\Facades\File; use Illuminate\Support\Str; use Pest\Exceptions\InvalidConsoleArgument; + use function Pest\testDirectory; + use Pest\TestSuite; /** diff --git a/src/Laravel/Commands/PestInstallCommand.php b/src/Laravel/Commands/PestInstallCommand.php index 75f6dd54..fb6275ce 100644 --- a/src/Laravel/Commands/PestInstallCommand.php +++ b/src/Laravel/Commands/PestInstallCommand.php @@ -8,7 +8,9 @@ use Illuminate\Console\Command; use Illuminate\Support\Facades\File; use Pest\Console\Thanks; use Pest\Exceptions\InvalidConsoleArgument; + use function Pest\testDirectory; + use Pest\TestSuite; /** diff --git a/src/Laravel/Commands/PestTestCommand.php b/src/Laravel/Commands/PestTestCommand.php index ee18e076..aa67459e 100644 --- a/src/Laravel/Commands/PestTestCommand.php +++ b/src/Laravel/Commands/PestTestCommand.php @@ -8,7 +8,9 @@ use Illuminate\Console\Command; use Illuminate\Support\Facades\File; use Pest\Exceptions\InvalidConsoleArgument; use Pest\Support\Str; + use function Pest\testDirectory; + use Pest\TestSuite; /** diff --git a/src/Logging/JUnit.php b/src/Logging/JUnit.php index 61e19a89..2c75cde3 100644 --- a/src/Logging/JUnit.php +++ b/src/Logging/JUnit.php @@ -13,11 +13,14 @@ declare(strict_types=1); namespace Pest\Logging; use function class_exists; + use DOMDocument; use DOMElement; use Exception; + use function get_class; use function method_exists; + use Pest\Concerns\Testable; use PHPUnit\Framework\AssertionFailedError; use PHPUnit\Framework\ExceptionWrapper; @@ -32,9 +35,12 @@ use PHPUnit\Util\Printer; use PHPUnit\Util\Xml; use ReflectionClass; use ReflectionException; + use function sprintf; use function str_replace; + use Throwable; + use function trim; /** diff --git a/src/Logging/TeamCity.php b/src/Logging/TeamCity.php index d1dfe271..d0cb85f5 100644 --- a/src/Logging/TeamCity.php +++ b/src/Logging/TeamCity.php @@ -5,10 +5,13 @@ declare(strict_types=1); namespace Pest\Logging; use function getmypid; + use Pest\Concerns\Logging\WritesToConsole; use Pest\Concerns\Testable; use Pest\Support\ExceptionTrace; + use function Pest\version; + use PHPUnit\Framework\AssertionFailedError; use PHPUnit\Framework\Test; use PHPUnit\Framework\TestCase; @@ -16,9 +19,11 @@ use PHPUnit\Framework\TestResult; use PHPUnit\Framework\TestSuite; use PHPUnit\Framework\Warning; use PHPUnit\TextUI\DefaultResultPrinter; + use function round; use function str_replace; use function strlen; + use Throwable; final class TeamCity extends DefaultResultPrinter diff --git a/src/Plugins/Version.php b/src/Plugins/Version.php index 000bb3a3..0baeb0b0 100644 --- a/src/Plugins/Version.php +++ b/src/Plugins/Version.php @@ -5,7 +5,9 @@ declare(strict_types=1); namespace Pest\Plugins; use Pest\Contracts\Plugins\HandlesArguments; + use function Pest\version; + use Symfony\Component\Console\Output\OutputInterface; /** diff --git a/tests/Features/Expect/sequence.php b/tests/Features/Expect/sequence.php index 4f11b3a3..b15385e5 100644 --- a/tests/Features/Expect/sequence.php +++ b/tests/Features/Expect/sequence.php @@ -40,8 +40,10 @@ test('fails if the number of iterable items is greater than the number of expect test('it works with associative arrays', function () { expect(['foo' => 'bar', 'baz' => 'boom']) ->sequence( - function ($expectation, $key) { $expectation->toEqual('bar'); $key->toEqual('foo'); }, - function ($expectation, $key) { $expectation->toEqual('boom'); $key->toEqual('baz'); }, + function ($expectation, $key) { $expectation->toEqual('bar'); + $key->toEqual('foo'); }, + function ($expectation, $key) { $expectation->toEqual('boom'); + $key->toEqual('baz'); }, ); }); diff --git a/tests/PHPUnit/CustomTestCase/CustomTestCase.php b/tests/PHPUnit/CustomTestCase/CustomTestCase.php index 2eb0ad4e..a03b82c9 100644 --- a/tests/PHPUnit/CustomTestCase/CustomTestCase.php +++ b/tests/PHPUnit/CustomTestCase/CustomTestCase.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Tests\CustomTestCase; use function PHPUnit\Framework\assertTrue; + use PHPUnit\Framework\TestCase; class CustomTestCase extends TestCase diff --git a/tests/PHPUnit/CustomTestCase/ExecutedTest.php b/tests/PHPUnit/CustomTestCase/ExecutedTest.php index 71a32980..00e759bb 100644 --- a/tests/PHPUnit/CustomTestCase/ExecutedTest.php +++ b/tests/PHPUnit/CustomTestCase/ExecutedTest.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Tests\CustomTestCase; use function PHPUnit\Framework\assertTrue; + use PHPUnit\Framework\TestCase; class ExecutedTest extends TestCase diff --git a/tests/Unit/Plugins/Version.php b/tests/Unit/Plugins/Version.php index 211f11e3..ffb076c7 100644 --- a/tests/Unit/Plugins/Version.php +++ b/tests/Unit/Plugins/Version.php @@ -1,7 +1,9 @@