/webtrees/app/Module/ |
H A D | LanguageFrench.php | 113 …$genitive = static fn (string $s, string $genitive_link): array => [$s, '%s ' . $genitive_link . $… 116 $degree = static fn (int $n, string $suffix, string $genitive_link): array => 119 $great = static fn (int $n, string $suffix, string $genitive_link): array => 122 $firstCompound = static fn (int $n, string $suffix, string $genitive_link): array => 126 …static fn (int $n, string $first_level, string $suffix, string $genitive_none, string $genitive_fi… 130 …$symmetricCousin = static fn (int $n, string $sex): array => self::SYMMETRIC_COUSINS[$n][$sex] ?? … 250 …Relationship::dynamic(static fn (int $n) => $firstCompound($n, 'grand-mère maternelle', 'de la '))… 251 …Relationship::dynamic(static fn (int $n) => $firstCompound($n, 'grand-père maternel', 'du '))->mot… 252 …Relationship::dynamic(static fn (int $n) => $firstCompound($n, 'grand-parent maternel', 'du '))->m… 253 …Relationship::dynamic(static fn (int $n) => $firstCompound($n, 'grand-mère paternelle', 'de la '))… [all …]
|
H A D | LanguageEnglishUnitedStates.php | 134 $genitive = static fn (string $s): array => [$s, $s . '’s %s']; 136 $cousin = static fn (int $up, int $down): array => $genitive( 142 $great = static fn (int $n, string $prefix, string $suffix): array => $genitive( 237 … Relationship::dynamic(static fn (int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sister(), 238 …Relationship::dynamic(static fn (int $n) => $great($n - 1, '', 'aunt'))->ancestor()->sibling()->wi… 239 … Relationship::dynamic(static fn (int $n) => $great($n - 1, '', 'uncle'))->ancestor()->brother(), 240 …Relationship::dynamic(static fn (int $n) => $great($n - 1, '', 'uncle'))->ancestor()->sibling()->h… 241 …Relationship::dynamic(static fn (int $n) => $great($n - 1, '', 'niece'))->sibling()->descendant()-… 242 …Relationship::dynamic(static fn (int $n) => $great($n - 1, '', 'niece'))->married()->spouse()->sib… 243 …Relationship::dynamic(static fn (int $n) => $great($n - 1, '', 'nephew'))->sibling()->descendant()… [all …]
|
H A D | LanguageSlovakian.php | 119 $pra = static fn (int $n, string $nominative, string $genitive): array => [ 124 …$cousin = static fn (int $n, array $cousins, string $nominative, string $genitive): array => $cous… 180 …Relationship::dynamic(static fn (int $n) => $pra($n - 1, 'prastarý otec', '%s prastarého otca'))->… 181 …Relationship::dynamic(static fn (int $n) => $pra($n - 1, 'prastará matka', '%s prastarej matky'))-… 182 …Relationship::dynamic(static fn (int $n) => $pra($n - 1, 'prastarý rodič', '%s prastarého rodiča')… 192 …Relationship::dynamic(static fn (int $n) => $pra($n - 1, 'pravnuk', '%s pravnuka'))->ancestor()->m… 193 …Relationship::dynamic(static fn (int $n) => $pra($n - 1, 'pravnučka', '%s pravnučky'))->ancestor()… 194 …Relationship::dynamic(static fn (int $n) => $pra($n - 1, 'pravnúča', '%s pravnúčaťa'))->ancestor(), 202 …Relationship::dynamic(static fn (int $n) => $pra($n - 2, 'prastrýko', '%s prastrýka'))->ancestor()… 203 …Relationship::dynamic(static fn (int $n) => $pra($n - 2, 'prateta', '%s pratety'))->ancestor()->si… [all …]
|
H A D | ShareAnniversaryModule.php | 92 …->merge($record->spouseFamilies()->map(fn (Family $family): Collection => $family->facts(static::F… 102 ->filter(fn (Fact $fact): bool => $fact->date()->isOK()) 103 ->filter(fn (Fact $fact): bool => $fact->date()->qual1 === '') 104 ->filter(fn (Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate) 105 …->filter(fn (Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJuli… 106 ->mapWithKeys(fn (Fact $fact): array => [ 137 $fact = $record->facts()->first(fn (Fact $fact): bool => $fact->id() === $fact_id);
|
H A D | TimelineChartModule.php | 158 …->map(static fn (string $xref): Individual|null => Registry::individualFactory()->make($xref, $tre… 167 … ->filter(static fn (Individual $individual): bool => $individual->xref() !== $exclude->xref()) 168 ->map(static fn (Individual $individual): string => $individual->xref()); 177 …$individuals = array_map(static fn (string $xref): Individual|null => Registry::individualFactory(… 179 …$individuals = array_filter($individuals, static fn (Individual|null $individual): bool => $indivi… 235 …$individuals = array_map(static fn (string $xref): Individual|null => Registry::individualFactory(… 237 …$individuals = array_filter($individuals, static fn (Individual|null $individual): bool => $indivi… 283 $indifacts = $indifacts->uniqueStrict(static fn (Fact $fact): string => $fact->id());
|
H A D | AbstractIndividualListModule.php | 210 …$variants = array_map(static fn (string $x): string => $x === '' ? I18N::translate('No surname') :… 314 $filter = static fn (string $x): bool => $x === Individual::NOMEN_NESCIO; 317 $filter = static fn (string $x): bool => $x === ''; 321 … $filter = static fn (string $x): bool => $x !== '' && $x !== Individual::NOMEN_NESCIO; 323 $filter = static fn (string $x): bool => $x === $surname; 328 … $filter = static fn (string $x): bool => I18N::language()->initialLetter($x) === $alpha; 330 $filter = static fn (string $x): bool => $x === $surname; 372 … $count = array_sum(array_map(static fn (array $x): int => array_sum($x), $all_surnames)); 380 … $all_surnames = array_values(array_map(static fn ($x): array => array_keys($x), $all_surnames)); 425 … static fn (string $x): bool => I18N::language()->initialLetter($x) === $alpha, [all …]
|
H A D | FixWtObjeSortTag.php | 139 ->map(static fn (Fact $fact): string => $fact->value()); 155 …->filter(static fn (Fact $fact): bool => $fact->tag() !== 'INDI:OBJE' && $fact->tag() !== 'INDI:_W… 156 ->map(static fn (Fact $fact): string => $fact->gedcom()) 159 …return $gedcom . $obje->map(static fn (Fact $fact): string => "\n" . $fact->gedcom())->implode('');
|
H A D | RecentChangesModule.php | 120 …$rows = $rows->sort(static fn (object $x, object $y): int => GedcomRecord::nameComparator()($x->r… 125 … $rows = $rows->sort(static fn (object $x, object $y): int => $x->time <=> $y->time); 131 … $rows = $rows->sort(static fn (object $x, object $y): int => $y->time <=> $x->time); 306 ->map(fn (object $row): object => (object) [ 311 …->filter(static fn (object $row): bool => $row->record instanceof GedcomRecord && $row->record->ca…
|
/webtrees/app/ |
H A D | Relationship.php | 83 return new self(fn () => [$nominative, $genitive]); 128 $this->matchers[] = static fn (array $nodes): bool => count($nodes) > 2 && $nodes[2] 130 …->contains(fn (Fact $fact): bool => $fact->value() === '@' . $nodes[1]->xref() . '@' && $fact->att… 140 $this->matchers[] = static fn (array $nodes): bool => $nodes[0] 142 …->contains(fn (Fact $fact): bool => $fact->value() === '@' . $nodes[1]->xref() . '@' && $fact->att… 336 $this->matchers[] = static fn (array $nodes): bool => $nodes[0]->sex() === $sex; 346 $this->matchers[] = static fn (array $nodes): bool => count($nodes) > 2 && $nodes[2] 348 …->contains(fn (Fact $fact): bool => $fact->value() === '@' . $nodes[1]->xref() . '@' && $fact->att… 358 $this->matchers[] = static fn (array $nodes): bool => $nodes[0] 360 …->contains(fn (Fact $fact): bool => $fact->value() === '@' . $nodes[1]->xref() . '@' && $fact->att… [all …]
|
H A D | Validator.php | 146 …$this->rules[] = static fn (int|string|null $value): int|string|null => in_array($value, $values, … 166 …$this->rules[] = static fn (string|null $value): string|null => $value !== null && $value !== '' ?… 282 $callback = static fn (array|null $value, Closure $rule): array|null => $rule($value); 303 $callback = static fn (?float $value, Closure $rule): float|null => $rule($value); 336 $callback = static fn (int|null $value, Closure $rule): int|null => $rule($value); 377 $callback = static fn (string|null $value, Closure $rule): string|null => $rule($value);
|
H A D | I18N.php | 223 … ->map(static fn (ModuleLanguageInterface $module): LocaleInterface => $module->locale()); 300 …->reduce(static fn (array $carry, ModuleCustomInterface $item): array => array_merge($carry, $item… 304 … ->first(fn (ModuleLanguageInterface $module): bool => $module->locale()->languageTag() === $code); 552 return static fn (string $x, string $y): int => (int) $collator->compare($x, $y); 555 …return static fn (string $x, string $y): int => strcmp(self::strtolower($x), self::strtolower($y));
|
/webtrees/app/Http/RequestHandlers/ |
H A D | TreePreferencesPage.php | 136 …$members = $this->user_service->all()->filter(static fn (UserInterface $user): bool => Auth::isMem… 141 … ->filter(static fn (string $value, string $key): bool => !in_array($key, $ignore_facts, true)) 142 ->mapWithKeys(static fn (string $value, string $key): array => [$key => 'FAM:' . $key]) 143 … ->map(static fn (string $tag): ElementInterface => Registry::elementFactory()->make($tag)) 144 … ->filter(static fn (ElementInterface $element): bool => !$element instanceof UnknownElement) 145 ->map(static fn (ElementInterface $element): string => $element->label()) 149 … ->filter(static fn (string $value, string $key): bool => !in_array($key, $ignore_facts, true)) 150 ->mapWithKeys(static fn (string $value, string $key): array => [$key => 'INDI:' . $key]) 151 … ->map(static fn (string $tag): ElementInterface => Registry::elementFactory()->make($tag)) 152 … ->filter(static fn (ElementInterface $element): bool => !$element instanceof UnknownElement) [all …]
|
H A D | SearchAdvancedPage.php | 153 …$fields = array_map(static fn (string $x): string => preg_replace('/^\s+|\s+$/uD', '', $x), $field… 155 $search_fields = array_filter($fields, static fn (string $x): bool => $x !== ''); 160 $fn = static fn (string $x, string $y): string => $x . '=' . $y; 161 …$message = 'Advanced: ' . implode(', ', array_map($fn, array_keys($search_fields), $search_fields)… 206 ->reject(fn (string $field): bool => array_key_exists($field, $fields)) 208 …->mapWithKeys(fn (string $fact): array => [$fact => Registry::elementFactory()->make($fact)->label…
|
H A D | ControlPanel.php | 140 …->filter(static fn (ModuleCustomInterface $module): bool => version_compare($module->customModuleL… 236 ->map(static fn (string $count): int => (int) $count) 251 ->map(static fn (string $count): int => (int) $count); 265 ->map(static fn (string $count): int => (int) $count); 279 ->map(static fn (string $count): int => (int) $count); 293 ->map(static fn (string $count): int => (int) $count); 311 ->map(static fn (string $count): int => (int) $count); 329 ->map(static fn (string $count): int => (int) $count); 347 ->map(static fn (string $count): int => (int) $count);
|
H A D | IndividualPage.php | 121 ->map(fn (ModuleShareInterface $module) => $module->share($individual)) 219 …$child_names = $family->children()->map(static fn (Individual $individual): string => e($individua… 226 $meta_facts = array_map(static fn (string $x): string => strip_tags($x), $meta_facts); 227 $meta_facts = array_map(static fn (string $x): string => trim($x), $meta_facts); 244 …->filter(static fn (ModuleSidebarInterface $sidebar): bool => $sidebar->hasSidebarContent($individ… 259 ->filter(static fn (ModuleTabInterface $tab): bool => $tab->hasTabContent($individual));
|
H A D | FamilyPage.php | 83 …->filter(static fn (Fact $fact): bool => !in_array($fact->tag(), ['FAM:HUSB', 'FAM:WIFE', 'FAM:CHI… 147 … ->map(static fn (Individual $individual): string => e($individual->getAllNames()[0]['givn'])) 148 ->filter(static fn (string $x): bool => $x !== Individual::PRAENOMEN_NESCIO) 154 $meta_facts = array_map(static fn (string $x): string => strip_tags($x), $meta_facts); 155 $meta_facts = array_map(static fn (string $x): string => trim($x), $meta_facts);
|
H A D | CalendarEvents.php | 97 …->sort(static fn (Fact $x, Fact $y): int => $x->date()->minimumJulianDay() <=> $y->date()->minimum… 99 …$family_anniversaries = $anniversaries->filter(static fn (Fact $f): bool => $f->record() instanceo… 101 …$individual_anniversaries = $anniversaries->filter(static fn (Fact $f): bool => $f->record() insta… 104 ->map(static fn (Fact $x): string => $x->record()->xref()) 109 ->map(static fn (Fact $x): string => $x->record()->xref())
|
/webtrees/app/Services/ |
H A D | MediaFileService.php | 287 ->filter(fn (StorageAttributes $attributes): bool => $attributes->isFile()) 288 … ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) 289 ->map(fn (StorageAttributes $attributes): string => $attributes->path()) 337 ->filter(fn (StorageAttributes $attributes): bool => $attributes->isDir()) 338 … ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) 339 ->map(fn (StorageAttributes $attributes): string => $attributes->path()) 364 ->map(static fn (string $path): string => dirname($path) . '/'); 381 ->filter(fn (StorageAttributes $attributes): bool => $attributes->isDir()) 382 … ->filter(fn (StorageAttributes $attributes): bool => !$this->ignorePath($attributes->path())) 383 ->map(fn (StorageAttributes $attributes): string => $attributes->path() . '/') [all …]
|
H A D | AdminService.php | 126 …->map(static fn (string $xrefs): array => array_map(static fn (string $xref): Source => Registry::… 152 …->map(static fn (string $xrefs): array => array_map(static fn (string $xref): Individual => Regist… 163 …->map(static fn (string $xrefs): array => array_map(static fn (string $xref): Family => Registry::… 174 …->map(static fn (string $xrefs): array => array_map(static fn (string $xref): Media => Registry::m… 262 ->map(fn (StorageAttributes $attributes) => $attributes->path())
|
H A D | GedcomEditService.php | 73 ->filter(static fn (string $tag): bool => $tag !== ''); 74 $facts = $tags->map(fn (string $tag): Fact => $this->createNewFact($dummy, $tag)); 90 ->filter(static fn (string $tag): bool => $tag !== ''); 91 $facts = $tags->map(fn (string $tag): Fact => $this->createNewFact($dummy, $tag)); 93 …$name_facts = Collection::make($names)->map(static fn (string $gedcom): Fact => new Fact($gedcom, … 238 …$subtags = array_filter($subtags, static fn (string $v, string $k) => !str_ends_with($v, ':1') || … 243 …$subtags = array_filter($subtags, fn (string $subtag): bool => !$this->isHiddenTag($record->tag() … 246 $fn_hidden = fn (string $t): bool => !$this->isHiddenTag($record->tag() . ':' . $t); 333 $fn_hide = static fn (string $x): bool => (bool) Site::getPreference('HIDE_' . $x);
|
H A D | ModuleService.php | 543 return static fn (ModuleInterface $module): string => $module->title(); 560 …->filter(static fn (ModuleInterface $module): bool => $module->accessLevel($tree, $interface) >= A… 621 ->mapWithKeys(static fn (object $row): array => [$row->module_name => $row]); 713 … ->mapWithKeys(static fn (ModuleCustomInterface $module): array => [$module->name() => $module]); 741 … return static fn (ModuleInterface $module): bool => $include_disabled || $module->isEnabled(); 755 return static fn (ModuleInterface $module): bool => $module instanceof $interface; 765 …return static fn (ModuleFooterInterface $x, ModuleFooterInterface $y): int => $x->getFooterOrder()… 775 …return static fn (ModuleMenuInterface $x, ModuleMenuInterface $y): int => $x->getMenuOrder() <=> $… 785 …return static fn (ModuleSidebarInterface $x, ModuleSidebarInterface $y): int => $x->getSidebarOrde… 795 …return static fn (ModuleTabInterface $x, ModuleTabInterface $y): int => $x->getTabOrder() <=> $y->… [all …]
|
H A D | HomePageService.php | 125 …$block = $active_blocks->first(static fn (ModuleInterface $module): bool => $module->name() === $m… 145 ->filter(static fn (ModuleBlockInterface $block): bool => $block->isTreeBlock()) 146 … ->mapWithKeys(static fn (ModuleBlockInterface $block): array => [$block->name() => $block]); 160 ->filter(static fn (ModuleBlockInterface $block): bool => $block->isUserBlock()) 161 … ->mapWithKeys(static fn (ModuleBlockInterface $block): array => [$block->name() => $block]); 388 …return $blocks->map(static fn (string $block_name): ModuleBlockInterface|null => $active_blocks->f…
|
/webtrees/app/Elements/ |
H A D | AgeAtEvent.php | 100 …'/\b(\d+)y\b/' => fn (array $match) => I18N::plural('%s year', '%s years', (int) $match[1], I18N::… 101 …'/\b(\d+)m\b/' => fn (array $match) => I18N::plural('%s month', '%s months', (int) $match[1], I18N… 102 …'/\b(\d+)w\b/' => fn (array $match) => I18N::plural('%s week', '%s weeks', (int) $match[1], I18N::… 103 …'/\b(\d+)d\b/' => fn (array $match) => I18N::plural('%s day', '%s days', (int) $match[1], I18N::nu…
|
/webtrees/resources/views/lists/ |
H A D | notes-table.phtml | 33 ->map(static fn ($n) => (int) $n) 45 ->map(static fn ($n) => (int) $n) 57 ->map(static fn ($n) => (int) $n) 69 ->map(static fn ($n) => (int) $n)
|
H A D | sources-table.phtml | 34 ->map(static fn ($n) => (int) $n) 46 ->map(static fn ($n) => (int) $n) 58 ->map(static fn ($n) => (int) $n) 71 ->map(static fn ($n) => (int) $n)
|