Skip to content

Commit

Permalink
Declare interface implementation from traits
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Sep 14, 2024
1 parent f634614 commit e5918ff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions formwork/src/Data/Traits/DataArrayable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

namespace Formwork\Data\Traits;

use Formwork\Data\Contracts\Arrayable;

/**
* @phpstan-require-implements Arrayable
*/
trait DataArrayable
{
/**
Expand Down
7 changes: 6 additions & 1 deletion formwork/src/Data/Traits/DataCountable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

namespace Formwork\Data\Traits;

trait DataCountable // implements \Countable
use Countable;

/**
* @phpstan-require-implements Countable
*/
trait DataCountable
{
protected array $data = [];

Expand Down
7 changes: 6 additions & 1 deletion formwork/src/Data/Traits/DataIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

namespace Formwork\Data\Traits;

trait DataIterator // implements \Iterator
use Iterator;

/**
* @phpstan-require-implements Iterator
*/
trait DataIterator
{
protected array $data = [];

Expand Down

0 comments on commit e5918ff

Please sign in to comment.