Skip to content

Commit

Permalink
Use array_fill in XmlResponseParser
Browse files Browse the repository at this point in the history
Fixes a Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
  • Loading branch information
JeroenDeDauw committed Oct 7, 2015
1 parent 586d4fa commit 1bf78b9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/SPARQLStore/QueryEngine/XmlResponseParser.php
Expand Up @@ -167,13 +167,7 @@ private function handleOpenElement( $parser, $elementTag, $attributes ) {
}
break;
case 'result' && ( $prevTag == 'results' ):
$row = array();

for ( $i = 0; $i < count( $this->header ); ++$i ) {
$row[$i] = null;
}

$this->data[] = $row;
$this->data[] = array_fill( 0, count( $this->header ), null );
break;
case 'literal' && ( $prevTag == 'binding' ):
if ( array_key_exists( 'datatype', $attributes ) ) {
Expand Down

0 comments on commit 1bf78b9

Please sign in to comment.