Skip to content

Commit

Permalink
fix: erreur phpmd const majuscule
Browse files Browse the repository at this point in the history
  • Loading branch information
ocruze committed Feb 3, 2025
1 parent 9c257d3 commit 75297b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Constants/EntrepotApi/ConfigurationMetadataTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
public const FGDC = 'FGDC';
public const TC211 = 'TC211';
public const _19139 = '19139';
public const Other = 'Other';
public const OTHER = 'Other';
}
4 changes: 2 additions & 2 deletions src/Controller/Entrepot/StyleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ private function updateStylesTmsMetadata(string $datastoreId, array $configurati

// suppression des fichiers de style venant de cartes.gouv.fr (voir styleUrlRegex)
$metadataList = array_values(array_filter($metadataList, function ($metadata) use ($styleUrlRegex) {
return !('application/json' === $metadata['format'] && preg_match($styleUrlRegex, $metadata['url']));
return !('application/json' === $metadata['format'] && preg_match($styleUrlRegex, $metadata['url']) && ConfigurationMetadataTypes::OTHER === $metadata['type']);
}));

// ajout des fichiers de style à jour dans la metadata de la configuration
Expand All @@ -319,7 +319,7 @@ private function updateStylesTmsMetadata(string $datastoreId, array $configurati
$metadataList[] = [
'format' => 'application/json',
'url' => $layer['url'],
'type' => ConfigurationMetadataTypes::Other,
'type' => ConfigurationMetadataTypes::OTHER,
];
}
}
Expand Down

0 comments on commit 75297b8

Please sign in to comment.