public function types(array $types = null)
    {
        deprecationWarning(
            'TypeMap::types() is deprecated. ' .
            'Use TypeMap::setTypes()/getTypes() instead.'
        );
        if ($types !== null) {
            return $this->setTypes($types);
        }

        return $this->getTypes();
    }