src/Collection.php
public function append($data)
    {
        if (is_array($data) || $data instanceof \Traversable) {
            foreach ($data as $entity) {
                if (!$entity instanceof Entity) {
                    throw new InvalidArgumentException('Collection can contain only Entities class');
                }
                parent::append($entity);
            }
        } else {
            parent::append($data);
        }
        return $this;
    }
public function append($data)
    {
        if (is_array($data) || $data instanceof \Traversable) {
            foreach ($data as $entity) {
                if (!$entity instanceof Entity) {
                    throw new InvalidArgumentException('Collection can contain only Entities class');
                }
                parent::append($entity);
            }
        } else {
            parent::append($data);
        }
        return $this;
    }
Append entities to collection

@param Entity|Collection|Traversable|array $data entity or list of entities to append
@access public

@return static