Skip to content

Commit

Permalink
docs: remove type resource in @template
Browse files Browse the repository at this point in the history
It seems Psalm does not allow to use `resource` in @template type.
See
- codeigniter4/settings#60 (comment)
- codeigniter4/shield#195 (comment)
  • Loading branch information
kenjis committed Apr 25, 2023
1 parent 6c346b6 commit 21fa565
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions system/Database/BaseConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
* @property bool $transFailure
* @property bool $transStatus
*
* @template TConnection of object|resource
* @template TResult of object|resource
* @template TConnection
* @template TResult
*
* @implements ConnectionInterface<TConnection, TResult>
*/
Expand Down
6 changes: 3 additions & 3 deletions system/Database/BasePreparedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
use ErrorException;

/**
* @template TConnection of object|resource
* @template TStatement of object|resource
* @template TResult of object|resource
*
* @implements PreparedQueryInterface<TConnection, TStatement, TResult>
* @template TConnection
* @template TStatement
* @template TResult
*/
abstract class BasePreparedQuery implements PreparedQueryInterface
{
Expand Down
4 changes: 2 additions & 2 deletions system/Database/BaseResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
use stdClass;

/**
* @template TConnection of object|resource
* @template TResult of object|resource
*
* @implements ResultInterface<TConnection, TResult>
* @template TConnection
* @template TResult
*/
abstract class BaseResult implements ResultInterface
{
Expand Down
4 changes: 2 additions & 2 deletions system/Database/ConnectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace CodeIgniter\Database;

/**
* @template TConnection of object|resource
* @template TResult of object|resource
* @template TConnection
* @template TResult
*/
interface ConnectionInterface
{
Expand Down

0 comments on commit 21fa565

Please sign in to comment.