File tree Expand file tree Collapse file tree 5 files changed +121
-138
lines changed
Expand file tree Collapse file tree 5 files changed +121
-138
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,7 @@ public function replay(object $event): void
2929 #[EventHandler]
3030 public function onPackageDownloadsListed (PackageDownloadsListed $ event ): void
3131 {
32- $ previousDay = PackageDownloadsPerDay::query ()
33- ->whereField ('package ' , $ event ->package )
34- ->orderBy ('date DESC ' )
35- ->first ();
36-
37- if ($ previousDay ) {
38- $ count = $ event ->total - $ previousDay ->total ;
39- } else {
40- $ count = $ event ->total ;
41- }
32+ $ count = $ event ->total ;
4233
4334 $ count = max ($ count , 0 );
4435
Original file line number Diff line number Diff line change @@ -29,16 +29,7 @@ public function replay(object $event): void
2929 #[EventHandler]
3030 public function onPackageDownloadsListed (PackageDownloadsListed $ event ): void
3131 {
32- $ previousHour = PackageDownloadsPerHour::query ()
33- ->whereField ('package ' , $ event ->package )
34- ->orderBy ('date DESC ' )
35- ->first ();
36-
37- if ($ previousHour ) {
38- $ count = $ event ->total - $ previousHour ->total ;
39- } else {
40- $ count = $ event ->total ;
41- }
32+ $ count = $ event ->total ;
4233
4334 $ count = max ($ count , 0 );
4435
Original file line number Diff line number Diff line change 1919 <x-chart :chart= " $visitsPerHour" label = " Visits per hour" title = " Website visits last 24 hours" ></x-chart >
2020 <x-chart :chart= " $visitsPerDay" label = " Visits per day" title = " Website visits last 30 days" ></x-chart >
2121 <div ></div >
22- <x-chart :chart= " $packageDownloadsPerHour" label = " Downloads per hour" title = " Package downloads last 24 hours" ></x-chart >
2322 <x-chart :chart= " $packageDownloadsPerDay" label = " Downloads per day" title = " Package downloads last 30 days" ></x-chart >
2423 </div >
2524 </div >
Original file line number Diff line number Diff line change 22
33namespace App \Support \StoredEvents ;
44
5- use Tempest \Core \Discovery ;
6- use Tempest \Core \DiscoveryLocation ;
7- use Tempest \Core \IsDiscovery ;
5+ use Tempest \Discovery \Discovery ;
6+ use Tempest \Discovery \DiscoveryLocation ;
7+ use Tempest \Discovery \IsDiscovery ;
88use Tempest \Reflection \ClassReflector ;
99
1010final class ProjectionDiscovery implements Discovery
You can’t perform that action at this time.
0 commit comments