cluster: add missing return type
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/877/head
parent
1565638405
commit
33561f9ab4
|
@ -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'];
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
|
|
|
@ -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'];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue