The expression $this->serializationStrategy; of type NilPortugues\Serializer\...r\Strategy\JsonStrategy adds the type NilPortugues\Serializer\Strategy\JsonStrategy to the return on line 25 which is incompatible with the return type documented by NilPortugues\Api\Xml\XmlSerializer::getTransformer of type NilPortugues\Api\Xml\XmlTransformer.