Merged
Conversation
API Specification - Non-breaking changesAPI Changelog 1.0.0 vs. 1.0.0No changes detected |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #69 +/- ##
=============================================
+ Coverage 39.15% 39.29% +0.13%
- Complexity 828 833 +5
=============================================
Files 119 120 +1
Lines 2572 2624 +52
=============================================
+ Hits 1007 1031 +24
- Misses 1565 1593 +28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
turegjorup
reviewed
Apr 22, 2026
Comment on lines
+198
to
+207
| $sites = []; | ||
| foreach ($this->packageVersions as $packageVersion) { | ||
| foreach ($packageVersion->getInstallations() as $installation) { | ||
| foreach ($installation->getSites() as $site) { | ||
| $sites[$site->getId()->toRfc4122()] = $site; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return new ArrayCollection(array_values($sites)); |
Contributor
There was a problem hiding this comment.
Suggested change
| $sites = []; | |
| foreach ($this->packageVersions as $packageVersion) { | |
| foreach ($packageVersion->getInstallations() as $installation) { | |
| foreach ($installation->getSites() as $site) { | |
| $sites[$site->getId()->toRfc4122()] = $site; | |
| } | |
| } | |
| } | |
| return new ArrayCollection(array_values($sites)); | |
| $sites = new ArrayCollection(); | |
| foreach ($this->packageVersions as $packageVersion) { | |
| foreach ($packageVersion->getInstallations() as $installation) { | |
| foreach ($installation->getSites() as $site) { | |
| if (!$sites->contains($site)) { | |
| $sites->add($site); | |
| } | |
| } | |
| } | |
| } | |
| return $sites; | |
turegjorup
approved these changes
Apr 22, 2026
Contributor
turegjorup
left a comment
There was a problem hiding this comment.
One suggestion for writing the getSites() function without the array, using only a collection. Suggestion only, highly subjective which one is "best"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to ticket
https://leantime.itkdev.dk/ProjectOverview/projectOverview?userIds=14&tab=timesheet#/tickets/showTicket/6667
Description
Add Sites table on advisories and sites count on list display
Screenshot of the result