Skip to content

Commit

Permalink
优化注释,尽可能使用 inheritDoc 注释
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 13, 2021
1 parent 35b71d8 commit 1f7cf9b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
class JsonObjectEOFParser extends \Imi\Server\DataParser\JsonObjectParser
{
/**
* 编码为存储格式.
*
* @param mixed $data
* {@inheritDoc}
*/
public function encode($data): string
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
class JsonObjectFixedParser extends \Imi\Server\DataParser\JsonObjectParser
{
/**
* 编码为存储格式.
*
* @param mixed $data
* {@inheritDoc}
*/
public function encode($data): string
{
Expand All @@ -19,9 +17,7 @@ public function encode($data): string
}

/**
* 解码为php变量.
*
* @return mixed
* {@inheritDoc}
*/
public function decode(string $data)
{
Expand Down
2 changes: 1 addition & 1 deletion example/UDPServer/Listener/OnServerCreateAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class OnServerCreateAfter implements IEventListener
{
/**
* 事件处理方法.
* {@inheritDoc}
*/
public function handle(EventParam $e): void
{
Expand Down
3 changes: 3 additions & 0 deletions src/Http/Middleware/SwooleTrackerMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class SwooleTrackerMiddleware extends BaseMiddleware implements MiddlewareInterf
*/
protected int $successStatusCode = StatusCode::OK;

/**
* {@inheritDoc}
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
// @phpstan-ignore-next-line
Expand Down
2 changes: 1 addition & 1 deletion src/TCP/Middleware/SwooleTrackerMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __init(): void
}

/**
* @return mixed
* {@inheritDoc}
*/
public function process(IReceiveData $data, IReceiveHandler $handler)
{
Expand Down
2 changes: 1 addition & 1 deletion src/UDP/Middleware/SwooleTrackerMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __init(): void
}

/**
* @return mixed
* {@inheritDoc}
*/
public function process(IPacketData $data, IPacketHandler $handler)
{
Expand Down
2 changes: 1 addition & 1 deletion src/WebSocket/Middleware/SwooleTrackerMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __init(): void
}

/**
* @return mixed
* {@inheritDoc}
*/
public function process(IFrame $frame, IMessageHandler $handler)
{
Expand Down

0 comments on commit 1f7cf9b

Please sign in to comment.