public function isValidEntity($mixed): bool
    {
        if (empty($this->entityClasses)) {
            return true;
        } else {
            if (is_object($mixed)) {
                foreach ($this->entityClasses as $entityClass) {
                    if (is_a($mixed, $entityClass, true)) {
                        return true;
                    }
                }
            }
        }

        return false;
    }
public function isValidEntity($mixed): bool
    {
        if (empty($this->entityClasses)) {
            return true;
        } else {
            if (is_object($mixed)) {
                foreach ($this->entityClasses as $entityClass) {
                    if (is_a($mixed, $entityClass, true)) {
                        return true;
                    }
                }
            }
        }

        return false;
    }
public function isValidEntity ( $ mixed ) : bool { if ( empty ( $ this -> entityClasses ) ) { return true ; } else { if ( is_object ( $ mixed ) ) { foreach ( $ this -> entityClasses as $ entityClass ) { if ( is_a ( $ mixed , $ entityClass , true ) ) { return true ; } } } } return false ; }
Check if element is valid for the list.

@param mixed $mixed Element to check

@return bool
Check if element is valid for the list .