Create and implement CollectionInterface as contract of all collections (e.g. based on the BaseCollection class)

This commit is contained in:
Meritoo
2021-03-29 19:02:28 +02:00
parent e47eaae8b2
commit 4f8c355d1b
8 changed files with 93 additions and 33 deletions

View File

@@ -6,11 +6,11 @@
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Meritoo\Common\Collection;
use ArrayAccess;
use Countable;
use IteratorAggregate;
use Meritoo\Common\Contract\Collection\CollectionInterface;
use Meritoo\Common\Traits\CollectionTrait;
/**
@@ -19,7 +19,7 @@ use Meritoo\Common\Traits\CollectionTrait;
* @author Meritoo <github@meritoo.pl>
* @copyright Meritoo <http://www.meritoo.pl>
*/
abstract class BaseCollection implements Countable, ArrayAccess, IteratorAggregate
abstract class BaseCollection implements CollectionInterface
{
use CollectionTrait;