Entity теперь имплементирует Arrayable и ArrayAccess для совместимости с иммутабельными методами коллекций
This commit is contained in:
@@ -87,6 +87,7 @@ abstract class EntityCollection extends Collection
|
||||
*/
|
||||
public function checkCount(array $items = []): void
|
||||
{
|
||||
//TODO проверять пустоту?
|
||||
if (count($items) > static::MAX_COUNT || $this->count() === static::MAX_COUNT) {
|
||||
throw new (static::EXCEPTION_CLASS)(static::MAX_COUNT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user