Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit f6f7bab

Browse files
committed
Import Throwable when possible
1 parent 52e451f commit f6f7bab

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Application.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use InvalidArgumentException;
1212
use Psr\Http\Message\ResponseInterface;
1313
use Psr\Http\Message\ServerRequestInterface;
14+
use Throwable;
1415
use UnexpectedValueException;
1516
use Zend\Diactoros\Response;
1617
use Zend\Diactoros\Response\EmitterInterface;
@@ -664,7 +665,7 @@ private function swallowDeprecationNotices()
664665
}
665666

666667
/**
667-
* @var \Exception|\Throwable $exception
668+
* @param \Exception|Throwable $exception
668669
* @return void
669670
*/
670671
private function emitMarshalServerRequestException($exception)

test/ApplicationTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Psr\Http\Message\ResponseInterface;
2020
use ReflectionProperty;
2121
use RuntimeException;
22+
use Throwable;
2223
use UnexpectedValueException;
2324
use Zend\Diactoros\Response;
2425
use Zend\Diactoros\Response\EmitterInterface;
@@ -681,7 +682,7 @@ public function testRunInvokesFinalHandlerWhenServerRequestFactoryRaisesExceptio
681682
$app = new Application($this->router->reveal(), null, $finalHandler, $emitter->reveal());
682683

683684
$app->run();
684-
} catch (\Throwable $e) {
685+
} catch (Throwable $e) {
685686
$this->fail($e->getMessage());
686687
} catch (\Exception $e) {
687688
$this->fail($e->getMessage());

0 commit comments

Comments
 (0)