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 6e3d643 commit 92fbbc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Listener/AfterServersCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class AfterServersCreate implements IEventListener
{
/**
* 事件处理方法.
* {@inheritDoc}
*/
public function handle(EventParam $e): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Pool/ClientPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class ClientPool extends BaseAsyncPool
{
/**
* 创建资源.
* {@inheritDoc}
*/
protected function createResource(): \Imi\Pool\Interfaces\IPoolResource
{
Expand Down
12 changes: 5 additions & 7 deletions src/Pool/ClientResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,38 @@ public function __construct(\Imi\Pool\Interfaces\IPool $pool, Client $client)
}

/**
* 打开
* {@inheritDoc}
*/
public function open(?callable $callback = null): bool
{
return $this->client->getClient()->connect();
}

/**
* 关闭.
* {@inheritDoc}
*/
public function close(): void
{
$this->client->getClient()->close();
}

/**
* 获取对象实例.
*
* @return mixed
* {@inheritDoc}
*/
public function getInstance()
{
return $this->client;
}

/**
* 重置资源,当资源被使用后重置一些默认的设置.
* {@inheritDoc}
*/
public function reset(): void
{
}

/**
* 检查资源是否可用.
* {@inheritDoc}
*/
public function checkState(): bool
{
Expand Down

0 comments on commit 92fbbc5

Please sign in to comment.