Skip to content

Commit 8f6f75d

Browse files
authored
Merge pull request #9 from edwinkortman/missing-include-in-generated-files
Remove use of namespace, keep it inline
2 parents 32e5be5 + 3364404 commit 8f6f75d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/Codeception/Module/Asserts.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
namespace Codeception\Module;
44

55
use Codeception\Lib\Notification;
6-
use Exception;
7-
use Throwable;
86

97
/**
108
* Special module for using asserts in your tests.
@@ -35,7 +33,7 @@ class Asserts extends AbstractAsserts
3533
* ```
3634
*
3735
* @deprecated Use expectThrowable() instead
38-
* @param Exception|string $exception
36+
* @param \Exception|string $exception
3937
* @param callable $callback
4038
*/
4139
public function expectException($exception, $callback)
@@ -67,7 +65,7 @@ public function expectException($exception, $callback)
6765
* });
6866
* ```
6967
*
70-
* @param Throwable|string $throwable
68+
* @param \Throwable|string $throwable
7169
* @param callable $callback
7270
*/
7371
public function expectThrowable($throwable, $callback)
@@ -84,10 +82,10 @@ public function expectThrowable($throwable, $callback)
8482

8583
try {
8684
$callback();
87-
} catch (Exception $t) {
85+
} catch (\Exception $t) {
8886
$this->checkThrowable($t, $class, $msg, $code);
8987
return;
90-
} catch (Throwable $t) {
88+
} catch (\Throwable $t) {
9189
$this->checkThrowable($t, $class, $msg, $code);
9290
return;
9391
}
@@ -99,7 +97,7 @@ public function expectThrowable($throwable, $callback)
9997
* Check if the given throwable matches the expected data,
10098
* fail (throws an exception) if it does not.
10199
*
102-
* @param Throwable $throwable
100+
* @param \Throwable $throwable
103101
* @param string $expectedClass
104102
* @param string $expectedMsg
105103
* @param int $expectedCode

0 commit comments

Comments
 (0)