src/ApiProblem.php
protected static function xmlToArray(\SimpleXMLElement $element) : array
    {
        $data = (array)$element;
        foreach ($data as $key => $value) {
            if ($value instanceof \SimpleXMLElement) {
                $data[$key] = static::xmlToArray($value);
            }
        }

        return $data;
    }
protected static function xmlToArray(\SimpleXMLElement $element) : array
    {
        $data = (array)$element;
        foreach ($data as $key => $value) {
            if ($value instanceof \SimpleXMLElement) {
                $data[$key] = static::xmlToArray($value);
            }
        }

        return $data;
    }
protected static function xmlToArray ( \ SimpleXMLElement $ element ) : array { $ data = ( array ) $ element ; foreach ( $ data as $ key => $ value ) { if ( $ value instanceof \ SimpleXMLElement ) { $ data [ $ key ] = static :: xmlToArray ( $ value ) ; } } return $ data ; }
Converts a SimpleXMLElement to a nested array.

@param \SimpleXMLElement $element
The XML
@return array
A nested array corresponding to the XML element provided.
Converts a SimpleXMLElement to a nested array .