Skip to content

Commit a00fa3a

Browse files
committed
Call parent on default api call
1 parent c14b78c commit a00fa3a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Atomx/ReportStreamer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class ReportStreamer {
1414
public function __construct(Stream $stream, $report = null)
1515
{
1616
if (!is_null($report)) {
17-
$this->columns = array_merge($report['report']['groups'], (isset($report['report']['sums']) ? $report['report']['sums'] : $report['report']['metrics']));
17+
$sumsOrMetrics = (isset($report['report']['sums']) ? $report['report']['sums'] : $report['report']['metrics']);
18+
$this->columns = array_merge($report['report']['groups'], $sumsOrMetrics);
1819
$this->count = $report['report']['count'];
1920
}
2021

@@ -54,4 +55,4 @@ public function readLine()
5455

5556
return $line;
5657
}
57-
}
58+
}

Atomx/Resources/Report.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function handleResponse(Response $response)
5353
if ($this->returnStream == true)
5454
return $stream;
5555
else
56-
return $stream->getContents();
56+
return parent::handleResponse($response);
5757
}
5858

5959
throw new ApiException('Request failed, received the following status: ' .

0 commit comments

Comments
 (0)