private function validate(SimpleXMLElement $xml): void
    {
        if ($xml->getName() !== 'phpdocumentor') {
            throw new InvalidArgumentException(
                sprintf('Root element name should be phpdocumentor, %s found', $xml->getName())
            );
        }
    }
private function validate(SimpleXMLElement $xml): void
    {
        if ($xml->getName() !== 'phpdocumentor') {
            throw new InvalidArgumentException(
                sprintf('Root element name should be phpdocumentor, %s found', $xml->getName())
            );
        }
    }
private function validate ( SimpleXMLElement $ xml ) : void { if ( $ xml -> getName ( ) !== 'phpdocumentor' ) { throw new InvalidArgumentException ( sprintf ( 'Root element name should be phpdocumentor, %s found' , $ xml -> getName ( ) ) ) ; } }
Validates if the xml has a root element which name is phpdocumentor.

@throws InvalidArgumentException if the root element of the xml is not phpdocumentor.
Validates if the xml has a root element which name is phpdocumentor .