src/TableParser/HTML/HTMLStringTableParser.php
protected function requireSingleChild(\SimpleXMLElement $html_table, $tag_name)
    {
        if ( ! $child = $html_table->$tag_name) {
            throw new \InvalidArgumentException(
                'No <'.$tag_name.'> found in <'.$html_table->getName().'>'
            );
        }

        /** @var \SimpleXmlElement $child */

        if ($child->count() > 1) {
            throw new \InvalidArgumentException(
                'Multiple <'.$tag_name.'> found in <'.$html_table->getName().'>'
            );
        }

        return $child;
    }
protected function requireSingleChild(\SimpleXMLElement $html_table, $tag_name)
    {
        if ( ! $child = $html_table->$tag_name) {
            throw new \InvalidArgumentException(
                'No <'.$tag_name.'> found in <'.$html_table->getName().'>'
            );
        }

        /** @var \SimpleXmlElement $child */

        if ($child->count() > 1) {
            throw new \InvalidArgumentException(
                'Multiple <'.$tag_name.'> found in <'.$html_table->getName().'>'
            );
        }

        return $child;
    }
protected function requireSingleChild ( \ SimpleXMLElement $ html_table , $ tag_name ) { if ( ! $ child = $ html_table -> $ tag_name ) { throw new \ InvalidArgumentException ( 'No <' . $ tag_name . '> found in <' . $ html_table -> getName ( ) . '>' ) ; } /** @var \SimpleXmlElement $child */ if ( $ child -> count ( ) > 1 ) { throw new \ InvalidArgumentException ( 'Multiple <' . $ tag_name . '> found in <' . $ html_table -> getName ( ) . '>' ) ; } return $ child ; }
@param \SimpleXMLElement $html_table
@param string            $tag_name

@return \SimpleXMLElement
@param \ SimpleXMLElement $html_table @param string $tag_name