@@ -57,7 +57,7 @@ |
||
57 | 57 | */ |
58 | 58 | public function name(): string |
59 | 59 | { |
60 | - return $this->module->name() . '-' . |
|
60 | + return $this->module->name().'-'. |
|
61 | 61 | mb_substr(str_replace('collector', '', mb_strtolower((new ReflectionClass($this))->getShortName())), 0, 64); |
62 | 62 | } |
63 | 63 |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function merge(GeoAnalysisResult $other): self |
136 | 136 | { |
137 | - $this->places->each(function (GeoAnalysisResultItem $item) use ($other): void { |
|
137 | + $this->places->each(function(GeoAnalysisResultItem $item) use ($other): void { |
|
138 | 138 | if ($other->places->has($item->key())) { |
139 | 139 | $item->place()->exclude( |
140 | 140 | $item->place()->isExcluded() |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | } |
144 | 144 | }); |
145 | 145 | |
146 | - $other->places->each(function (GeoAnalysisResultItem $item): void { |
|
146 | + $other->places->each(function(GeoAnalysisResultItem $item): void { |
|
147 | 147 | if (!$this->places->has($item->key())) { |
148 | 148 | $this->addPlace($item->place()); |
149 | 149 | } |
@@ -230,8 +230,8 @@ discard block |
||
230 | 230 | public function sortedKnownPlaces(bool $exclude_other = false): Collection |
231 | 231 | { |
232 | 232 | return $this->knownPlaces($exclude_other)->sortBy([ |
233 | - fn (GeoAnalysisResultItem $a, GeoAnalysisResultItem $b): int => $b->count() <=> $a->count(), |
|
234 | - fn (GeoAnalysisResultItem $a, GeoAnalysisResultItem $b): int => |
|
233 | + fn(GeoAnalysisResultItem $a, GeoAnalysisResultItem $b): int => $b->count() <=> $a->count(), |
|
234 | + fn(GeoAnalysisResultItem $a, GeoAnalysisResultItem $b): int => |
|
235 | 235 | I18N::comparator()($a->place()->place()->gedcomName(), $b->place()->place()->gedcomName()) |
236 | 236 | ]); |
237 | 237 | } |
@@ -105,10 +105,10 @@ |
||
105 | 105 | public function jsonSerialize() |
106 | 106 | { |
107 | 107 | return [ |
108 | - 'default' => (string) $this->defaultColor()->toHex(), |
|
109 | - 'stroke' => (string) $this->strokeColor()->toHex(), |
|
110 | - 'maxvalue' => (string) $this->maxValueColor()->toHex(), |
|
111 | - 'hover' => (string) $this->hoverColor()->toHex(), |
|
108 | + 'default' => (string)$this->defaultColor()->toHex(), |
|
109 | + 'stroke' => (string)$this->strokeColor()->toHex(), |
|
110 | + 'maxvalue' => (string)$this->maxValueColor()->toHex(), |
|
111 | + 'hover' => (string)$this->hoverColor()->toHex(), |
|
112 | 112 | ]; |
113 | 113 | } |
114 | 114 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | { |
48 | 48 | if (!isset($this->filesystem[$tree->id()])) { |
49 | 49 | $cert_dir = $tree->getPreference('MAJ_CERTIF_ROOTDIR', 'certificates/'); |
50 | - $adapter = new ChrootAdapter(Registry::filesystem()->data(), $cert_dir); |
|
50 | + $adapter = new ChrootAdapter(Registry::filesystem()->data(), $cert_dir); |
|
51 | 51 | |
52 | 52 | $this->filesystem[$tree->id()] = new FileSystem($adapter); |
53 | 53 | } |
@@ -89,10 +89,10 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function cities(Tree $tree): array |
91 | 91 | { |
92 | - $cities = $this->filesystem($tree) |
|
92 | + $cities = $this->filesystem($tree) |
|
93 | 93 | ->listContents('') |
94 | - ->filter(fn (StorageAttributes $attributes): bool => $attributes->isDir()) |
|
95 | - ->map(fn (StorageAttributes $attributes): string => $attributes->path()) |
|
94 | + ->filter(fn(StorageAttributes $attributes): bool => $attributes->isDir()) |
|
95 | + ->map(fn(StorageAttributes $attributes): string => $attributes->path()) |
|
96 | 96 | ->toArray(); |
97 | 97 | usort($cities, I18N::comparator()); |
98 | 98 | return $cities; |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | { |
110 | 110 | $filesystem = $this->filesystem($tree); |
111 | 111 | $certificates_paths = $filesystem->listContents($city) |
112 | - ->filter(fn (StorageAttributes $attributes): bool => |
|
112 | + ->filter(fn(StorageAttributes $attributes): bool => |
|
113 | 113 | $attributes->isFile() && $this->isFileSupported($filesystem, $attributes->path())) |
114 | - ->map(fn (StorageAttributes $attributes): string => $attributes->path()) |
|
114 | + ->map(fn(StorageAttributes $attributes): string => $attributes->path()) |
|
115 | 115 | ->toArray(); |
116 | 116 | usort($certificates_paths, I18N::comparator()); |
117 | - return collect($certificates_paths)->map(fn (string $path): Certificate => new Certificate($tree, $path)); |
|
117 | + return collect($certificates_paths)->map(fn(string $path): Certificate => new Certificate($tree, $path)); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -129,13 +129,13 @@ discard block |
||
129 | 129 | { |
130 | 130 | $filesystem = $this->filesystem($tree); |
131 | 131 | $certificates_paths = $filesystem->listContents($city) |
132 | - ->filter(fn (StorageAttributes $attributes): bool => |
|
132 | + ->filter(fn(StorageAttributes $attributes): bool => |
|
133 | 133 | $attributes->isFile() && $this->isFileSupported($filesystem, $attributes->path()) |
134 | 134 | && mb_stripos($attributes->path(), $contains) !== false) |
135 | - ->map(fn (StorageAttributes $attributes): string => $attributes->path()) |
|
135 | + ->map(fn(StorageAttributes $attributes): string => $attributes->path()) |
|
136 | 136 | ->toArray(); |
137 | 137 | usort($certificates_paths, I18N::comparator()); |
138 | - return collect($certificates_paths)->map(fn (string $path): Certificate => new Certificate($tree, $path)); |
|
138 | + return collect($certificates_paths)->map(fn(string $path): Certificate => new Certificate($tree, $path)); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | try { |
151 | 151 | $mime = $filesystem->mimeType($path); |
152 | 152 | return Registry::cache()->array()->remember( |
153 | - 'maj-certif-supportedfiles-' . $mime, |
|
154 | - fn (): bool => app(CertificateImageFactory::class)->isMimeTypeSupported($mime) |
|
153 | + 'maj-certif-supportedfiles-'.$mime, |
|
154 | + fn(): bool => app(CertificateImageFactory::class)->isMimeTypeSupported($mime) |
|
155 | 155 | ); |
156 | 156 | } catch (UnableToRetrieveMetadata | FilesystemException $ex) { |
157 | 157 | } |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $geoanalyses = $this->module_service |
52 | 52 | ->findByInterface(ModuleGeoAnalysisProviderInterface::class, $include_disabled) |
53 | 53 | ->flatMap(fn(ModuleGeoAnalysisProviderInterface $module) => $module->listGeoAnalyses()) |
54 | - ->map(static function (string $analysis_class): ?GeoAnalysisInterface { |
|
54 | + ->map(static function(string $analysis_class): ?GeoAnalysisInterface { |
|
55 | 55 | try { |
56 | 56 | $analysis = app($analysis_class); |
57 | 57 | return $analysis instanceof GeoAnalysisInterface ? $analysis : null; |
@@ -48,10 +48,10 @@ |
||
48 | 48 | public function all(bool $include_disabled = false): Collection |
49 | 49 | { |
50 | 50 | /** @var Collection<PlaceMapperInterface> $place_mappers */ |
51 | - $place_mappers = $this->module_service |
|
51 | + $place_mappers = $this->module_service |
|
52 | 52 | ->findByInterface(ModulePlaceMapperProviderInterface::class, $include_disabled) |
53 | 53 | ->flatMap(fn(ModulePlaceMapperProviderInterface $module) => $module->listPlaceMappers()) |
54 | - ->map(static function (string $mapper_class): ?PlaceMapperInterface { |
|
54 | + ->map(static function(string $mapper_class): ?PlaceMapperInterface { |
|
55 | 55 | try { |
56 | 56 | $mapper = app($mapper_class); |
57 | 57 | return $mapper instanceof PlaceMapperInterface ? $mapper : null; |