Skip to content

Commit 19c7405

Browse files
committed
Explicitly annotate non-person etymology
Setting gender to '-' instead of null when there is an etymology, but person==False, allows to render it differently from completely missing etymology.
1 parent 9848ac3 commit 19c7405

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Command/GeoJSONCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ private function createProperties($object, array &$warnings = []): Properties
395395
$_person = array_unique(array_column($detailsEtymology, 'person'));
396396
$_gender = array_unique(array_column($detailsEtymology, 'gender'));
397397

398-
$genderEtymology = (count($_person) === 1 && current($_person) === true) ? (count($_gender) === 1 ? current($_gender) : '+') : false;
398+
$genderEtymology = (count($_person) === 1 && current($_person) === true) ? (count($_gender) === 1 ? current($_gender) : '+') : '-';
399399

400400
if (count($detailsEtymology) === 1) {
401401
$detailsEtymology = current($detailsEtymology);
@@ -433,7 +433,7 @@ private function createProperties($object, array &$warnings = []): Properties
433433
$_person = array_unique(array_column($detailsWikidata, 'person'));
434434
$_gender = array_unique(array_column($detailsWikidata, 'gender'));
435435

436-
$genderWikidata = (count($_person) === 1 && current($_person) === true) ? (count($_gender) === 1 ? current($_gender) : '+') : false;
436+
$genderWikidata = (count($_person) === 1 && current($_person) === true) ? (count($_gender) === 1 ? current($_gender) : '+') : '-';
437437

438438
if (count($detailsWikidata) === 1) {
439439
$detailsWikidata = current($detailsWikidata);

0 commit comments

Comments
 (0)