Skip to content

Commit 6541b33

Browse files
committed
Remove un-needed sql query from get software assets
1 parent 346758b commit 6541b33

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/classes/Tools/Hosts/SoftwareAssets/GetSoftwareSnapshotOverview.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ public function get(\DateTimeImmutable $date = null)
2323
if ($date == null) {
2424
$date = new \DateTimeImmutable();
2525
}
26-
$snapshot = $this->fetchSoftwareAssetSnapshots->fetchForDate($date);
27-
$snapshotHeaders = $this->fetchSoftwareAssetSnapshots->fetchLastSevenHeaders();
2826

27+
$snapshot = $this->fetchSoftwareAssetSnapshots->fetchForDate($date);
2928

3029
$output = [
3130
"date" => $date->format("Y-m-d"),
@@ -85,7 +84,7 @@ public function get(\DateTimeImmutable $date = null)
8584
if (!isset($output["packages"][$packageKey])) {
8685
$output["packages"][$packageKey] = [
8786
"name" => $package["name"],
88-
"totalInstalls"=>0,
87+
"totalInstalls" => 0,
8988
"versions" => []
9089
];
9190
}
@@ -110,7 +109,7 @@ public function get(\DateTimeImmutable $date = null)
110109

111110
usort($output["packages"], [$this, "sortInstalls"]);
112111

113-
$output["packages"] = array_slice($output["packages"], 0 , 20);
112+
$output["packages"] = array_slice($output["packages"], 0, 20);
114113

115114
return $output;
116115
}

0 commit comments

Comments
 (0)