Skip to content

Commit a4b452e

Browse files
committed
Option to return the report ID
1 parent 64745c0 commit a4b452e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Atomx/Resources/Report.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function download($report)
7373
return new ReportStreamer($stream);
7474
}
7575

76-
public function runAndDownload($json, $timeout = 120)
76+
public function runAndDownload($json, $timeout = 120, $returnReportId = false)
7777
{
7878
$reportData = $this->run($json);
7979

@@ -87,7 +87,10 @@ public function runAndDownload($json, $timeout = 120)
8787
}
8888
}
8989

90-
return $this->download($reportData);
90+
if ($returnReportId)
91+
return [$this->download($reportData), Report::getReportId($reportData)];
92+
else
93+
return $this->download($reportData);
9194
}
9295

9396
protected function handleResponse(Response $response)

0 commit comments

Comments
 (0)