Skip to content

Commit 6d61c8d

Browse files
authored
Removed the use statement to not make static analysis trip over (#19)
1 parent ef4a270 commit 6d61c8d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Codeception/Module/Asserts.php

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Codeception\Module;
66

7-
use Throwable;
8-
97
/**
108
* Special module for using asserts in your tests.
119
*/
@@ -34,7 +32,7 @@ class Asserts extends AbstractAsserts
3432
* });
3533
* ```
3634
*
37-
* @param Throwable|string $throwable
35+
* @param \Throwable|string $throwable
3836
*/
3937
public function expectThrowable($throwable, callable $callback): void
4038
{
@@ -50,7 +48,7 @@ public function expectThrowable($throwable, callable $callback): void
5048

5149
try {
5250
$callback();
53-
} catch (Throwable $t) {
51+
} catch (\Throwable $t) {
5452
$this->checkThrowable($t, $class, $msg, $code);
5553
return;
5654
}
@@ -62,7 +60,7 @@ public function expectThrowable($throwable, callable $callback): void
6260
* Check if the given throwable matches the expected data,
6361
* fail (throws an exception) if it does not.
6462
*/
65-
protected function checkThrowable(Throwable $throwable, string $expectedClass, ?string $expectedMsg, ?int $expectedCode): void
63+
protected function checkThrowable(\Throwable $throwable, string $expectedClass, ?string $expectedMsg, ?int $expectedCode): void
6664
{
6765
if (!($throwable instanceof $expectedClass)) {
6866
$this->fail(sprintf(

0 commit comments

Comments
 (0)