Skip to content

Commit 0e8a71d

Browse files
authored
Format code (#5172)
1 parent 60d38d9 commit 0e8a71d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/Client.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use Psr\Container\ContainerInterface;
3232
use Psr\Http\Message\ResponseInterface;
3333
use Psr\Http\Message\ServerRequestInterface;
34+
use Throwable;
3435

3536
class Client extends Server
3637
{
@@ -204,7 +205,7 @@ protected function execute(ServerRequestInterface $psr7Request): ResponseInterfa
204205

205206
try {
206207
$psr7Response = $this->dispatcher->dispatch($psr7Request, $middlewares, $this->coreMiddleware);
207-
} catch (\Throwable $throwable) {
208+
} catch (Throwable $throwable) {
208209
// Delegate the exception to exception handler.
209210
$psr7Response = $this->exceptionHandlerDispatcher->dispatch($throwable, $this->exceptionHandlers);
210211
}

tests/DebugTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Hyperf\Testing\Debug;
1515
use PHPUnit\Framework\TestCase;
16+
use stdClass;
1617

1718
/**
1819
* @internal
@@ -22,10 +23,10 @@ class DebugTest extends TestCase
2223
{
2324
public function testGetRefCount()
2425
{
25-
$this->assertSame('1', Debug::getRefCount(new \stdClass()));
26-
$obj = new \stdClass();
26+
$this->assertSame('1', Debug::getRefCount(new stdClass()));
27+
$obj = new stdClass();
2728
$this->assertSame('2', Debug::getRefCount($obj));
28-
$obj2 = new \stdClass();
29+
$obj2 = new stdClass();
2930
$obj2->obj = $obj;
3031
$this->assertSame('2', Debug::getRefCount($obj2));
3132
$this->assertSame('3', Debug::getRefCount($obj));

tests/Stub/FooController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Hyperf\Context\Context;
1515
use Hyperf\Utils\Coroutine;
1616
use Psr\Http\Message\ServerRequestInterface;
17+
use RuntimeException;
1718

1819
class FooController
1920
{
@@ -24,7 +25,7 @@ public function index()
2425

2526
public function exception()
2627
{
27-
throw new \RuntimeException('Server Error', 500);
28+
throw new RuntimeException('Server Error', 500);
2829
}
2930

3031
public function id()

0 commit comments

Comments
 (0)