diff --git a/lib/ClustersBackend/AlbumsBackend.php b/lib/ClustersBackend/AlbumsBackend.php index dafa813d..83c498cd 100644 --- a/lib/ClustersBackend/AlbumsBackend.php +++ b/lib/ClustersBackend/AlbumsBackend.php @@ -112,7 +112,7 @@ class AlbumsBackend extends Backend return array_values($list); } - public static function getClusterId(array $cluster) + public static function getClusterId(array $cluster): int|string { return $cluster['cluster_id']; } diff --git a/lib/ClustersBackend/Backend.php b/lib/ClustersBackend/Backend.php index 63ae203f..faa9a9c4 100644 --- a/lib/ClustersBackend/Backend.php +++ b/lib/ClustersBackend/Backend.php @@ -69,10 +69,8 @@ abstract class Backend /** * Get a cluster ID for the given cluster. - * - * @return int|string */ - abstract public static function getClusterId(array $cluster); + abstract public static function getClusterId(array $cluster): int|string; /** * Get a list of photos with any extra parameters for the given cluster diff --git a/lib/ClustersBackend/FaceRecognitionBackend.php b/lib/ClustersBackend/FaceRecognitionBackend.php index 5ba0fade..92c6c8b4 100644 --- a/lib/ClustersBackend/FaceRecognitionBackend.php +++ b/lib/ClustersBackend/FaceRecognitionBackend.php @@ -132,7 +132,7 @@ class FaceRecognitionBackend extends Backend return $faces; } - public static function getClusterId(array $cluster) + public static function getClusterId(array $cluster): int|string { return $cluster['id']; } diff --git a/lib/ClustersBackend/PlacesBackend.php b/lib/ClustersBackend/PlacesBackend.php index 68f2a808..bdef23dd 100644 --- a/lib/ClustersBackend/PlacesBackend.php +++ b/lib/ClustersBackend/PlacesBackend.php @@ -168,7 +168,7 @@ class PlacesBackend extends Backend return $places; } - public static function getClusterId(array $cluster) + public static function getClusterId(array $cluster): int|string { return $cluster['osm_id']; } diff --git a/lib/ClustersBackend/RecognizeBackend.php b/lib/ClustersBackend/RecognizeBackend.php index 615cabae..29152f40 100644 --- a/lib/ClustersBackend/RecognizeBackend.php +++ b/lib/ClustersBackend/RecognizeBackend.php @@ -185,7 +185,7 @@ class RecognizeBackend extends Backend return $faces; } - public static function getClusterId(array $cluster) + public static function getClusterId(array $cluster): int|string { return $cluster['id']; } diff --git a/lib/ClustersBackend/TagsBackend.php b/lib/ClustersBackend/TagsBackend.php index 0410b42e..9d01d56b 100644 --- a/lib/ClustersBackend/TagsBackend.php +++ b/lib/ClustersBackend/TagsBackend.php @@ -106,7 +106,7 @@ class TagsBackend extends Backend return $tags; } - public static function getClusterId(array $cluster) + public static function getClusterId(array $cluster): int|string { return $cluster['name']; }