fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
418 stars 290 forks source link

Update PlacesModule.php #4999

Open arbor95 opened 2 weeks ago

arbor95 commented 2 weeks ago

change the color of the icon on map for birth and christening of the selected individuum to red.

codecov[bot] commented 2 weeks ago

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 ```diff @@ 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.

arbor95 commented 2 weeks ago

hi Greg perhaps you can help resolving the unsuccessful checks. thanks Franz

fisharebest commented 1 week ago

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,
arbor95 commented 1 week ago

what to do to handle the remaining unsuccessful check?

arbor95 commented 2 days ago

How to handle: Added line #L153 was not covered by tests and the others "Added line"