public function containsMultipleTypes()
    {
        $mixed = false;

        $types = [];
        foreach ($this->items as $item) {
            $class = get_class($item->getType());
            if (!in_array($class, $types, true)) {
                $types[] = $class;
            }
        }

        if (count($types) > 1) {
            $mixed = true;
        }

        return $mixed;
    }
public function containsMultipleTypes()
    {
        $mixed = false;

        $types = [];
        foreach ($this->items as $item) {
            $class = get_class($item->getType());
            if (!in_array($class, $types, true)) {
                $types[] = $class;
            }
        }

        if (count($types) > 1) {
            $mixed = true;
        }

        return $mixed;
    }
public function containsMultipleTypes ( ) { $ mixed = false ; $ types = [ ] ; foreach ( $ this -> items as $ item ) { $ class = get_class ( $ item -> getType ( ) ) ; if ( ! in_array ( $ class , $ types , true ) ) { $ types [ ] = $ class ; } } if ( count ( $ types ) > 1 ) { $ mixed = true ; } return $ mixed ; }
Returns whether the entities in the list have the same entity type

@return boolean
Returns whether the entities in the list have the same entity type