cluster: add missing return type

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/877/head
Varun Patil 2023-10-15 13:26:18 -07:00
parent 1565638405
commit 33561f9ab4
6 changed files with 6 additions and 8 deletions

View File

@ -112,7 +112,7 @@ class AlbumsBackend extends Backend
return array_values($list); return array_values($list);
} }
public static function getClusterId(array $cluster) public static function getClusterId(array $cluster): int|string
{ {
return $cluster['cluster_id']; return $cluster['cluster_id'];
} }

View File

@ -69,10 +69,8 @@ abstract class Backend
/** /**
* Get a cluster ID for the given cluster. * 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 * Get a list of photos with any extra parameters for the given cluster

View File

@ -132,7 +132,7 @@ class FaceRecognitionBackend extends Backend
return $faces; return $faces;
} }
public static function getClusterId(array $cluster) public static function getClusterId(array $cluster): int|string
{ {
return $cluster['id']; return $cluster['id'];
} }

View File

@ -168,7 +168,7 @@ class PlacesBackend extends Backend
return $places; return $places;
} }
public static function getClusterId(array $cluster) public static function getClusterId(array $cluster): int|string
{ {
return $cluster['osm_id']; return $cluster['osm_id'];
} }

View File

@ -185,7 +185,7 @@ class RecognizeBackend extends Backend
return $faces; return $faces;
} }
public static function getClusterId(array $cluster) public static function getClusterId(array $cluster): int|string
{ {
return $cluster['id']; return $cluster['id'];
} }

View File

@ -106,7 +106,7 @@ class TagsBackend extends Backend
return $tags; return $tags;
} }
public static function getClusterId(array $cluster) public static function getClusterId(array $cluster): int|string
{ {
return $cluster['name']; return $cluster['name'];
} }