src/UthandoCommon/Model/AbstractCollection.php
public function checkEntities($entities)
    {
        return array_filter($entities, function ($val) {
            $entityClass = $this->entityClass;
            return ($val instanceof $entityClass);
        });
    }
public function checkEntities($entities)
    {
        return array_filter($entities, function ($val) {
            $entityClass = $this->entityClass;
            return ($val instanceof $entityClass);
        });
    }
public function checkEntities ( $ entities ) { return array_filter ( $ entities , function ( $ val ) { $ entityClass = $ this -> entityClass ; return ( $ val instanceof $ entityClass ) ; } ) ; }
filter out all entities that don't belong to the entity class

@param $entities
@return array
filter out all entities that don t belong to the entity class