webtrees
webtrees copied to clipboard
Update PlacesModule.php
change the color of the icon on map for birth and christening of the selected individuum to red.
Codecov Report
Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
Project coverage is 33.85%. Comparing base (
f8d2a25) to head (dccf224).
| Files | Patch % | Lines |
|---|---|---|
| app/Module/PlacesModule.php | 0.00% | 5 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #4999 +/- ##
============================================
- Coverage 33.85% 33.85% -0.01%
- Complexity 11399 11400 +1
============================================
Files 1178 1178
Lines 47558 47561 +3
============================================
Hits 16103 16103
- Misses 31455 31458 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
hi Greg perhaps you can help resolving the unsuccessful checks. thanks Franz
The code-check is complaining that you have elseif at the start of a line. It should be on the previous line, after the }.
Would this be a simpler approach? It makes it easy to modify all the icons for the individual.
protected const OWN_ICONS = [
'INDI:BIRT' => ['color' => 'red', 'name' => 'baby-carriage fas'],
'INDI:CHR' => ['color' => 'red', 'name' => 'water fas'],
] + self::ICONS;
$icons = $fact->record() === $indi ? static::OWN_ICONS : static::ICONS;
'icon' => $icons[$fact->tag()] ?? static::DEFAULT_ICON,
what to do to handle the remaining unsuccessful check?
How to handle: Added line #L153 was not covered by tests and the others "Added line"
How to handle: Added line #L153 was not covered by tests and the others "Added line"
You can ignore this.
It says that there are no tests that use these lines of the code.
But none of this module has any tests yet.
Thanks!