code: protected function parseTable(\SimpleXMLElement $html_table)
      {
          $header = $this->parseRows($this->requireSingleChild($html_table, 'thead'));
  
          if (empty($header)) {
              throw new \InvalidArgumentException('No <tr> found in <thead>');
          } elseif (\count($header) > 1) {
              throw new \InvalidArgumentException(
                  'Multiple <tr> found in <thead> - you can mark additional rows with data-behat-table="ignore"'
              );
          }
  
          $body = $this->parseRows($this->requireSingleChild($html_table, 'tbody'));
  
          return \array_merge($header, $body);
      }
docs: @param \SimpleXMLElement $html_table
  
  @return array