src/Common/OptionsResolver.php
public function setTypesAllowed($allowedTypes = null)
    {
        if (!$this->isLatest()) {
            return $this->setAllowedTypes($allowedTypes);
        }

        foreach ($allowedTypes as $option => $typesAllowed) {
            $this->setAllowedTypes($option, $typesAllowed);
        }

        return $this;
    }
public function setTypesAllowed($allowedTypes = null)
    {
        if (!$this->isLatest()) {
            return $this->setAllowedTypes($allowedTypes);
        }

        foreach ($allowedTypes as $option => $typesAllowed) {
            $this->setAllowedTypes($option, $typesAllowed);
        }

        return $this;
    }
Set a list of allowed types for the given option.

@see Symfony\Component\OptionsResolver\OptionsResolver::setAllowedTypes()

@param array $allowedTypes

@return $this