@@ -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; |