From 35615bedb70acaccc5a6ffcedf1bab6aa0e5cec5 Mon Sep 17 00:00:00 2001 From: Sebastian Krupinski Date: Fri, 6 Mar 2026 22:54:54 -0500 Subject: [PATCH] refactor: service interface changes Signed-off-by: Sebastian Krupinski --- lib/Providers/Personal/PersonalService.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Providers/Personal/PersonalService.php b/lib/Providers/Personal/PersonalService.php index 6336477..f4bbf0d 100644 --- a/lib/Providers/Personal/PersonalService.php +++ b/lib/Providers/Personal/PersonalService.php @@ -192,7 +192,7 @@ class PersonalService implements ServiceBaseInterface, ServiceCollectionMutableI return new Sort($this->serviceAbilities[self::CAPABILITY_COLLECTION_LIST_SORT] ?? []); } - public function collectionExtant(string|int $location, string|int ...$identifiers): array { + public function collectionExtant(string|int|null $location, string|int ...$identifiers): array { $cached = []; $toCheck = []; foreach ($identifiers as $id) { @@ -209,7 +209,7 @@ class PersonalService implements ServiceBaseInterface, ServiceCollectionMutableI return array_merge($cached, $fromStore); } - public function collectionFetch(string|int $identifier): ?CollectionResource { + public function collectionFetch(string|int|null $identifier): ?CollectionResource { // null is root if ($identifier === null) { $identifier = self::ROOT_ID; @@ -433,7 +433,7 @@ class PersonalService implements ServiceBaseInterface, ServiceCollectionMutableI return $entity; } - public function entityCreate(string|int $collection, EntityMutableInterface $entity, array $options = []): EntityResource { + public function entityCreate(string|int|null $collection, EntityMutableInterface $entity, array $options = []): EntityResource { // null collection is root if ($collection === null) { $collection = self::ROOT_ID; @@ -467,7 +467,7 @@ class PersonalService implements ServiceBaseInterface, ServiceCollectionMutableI return $result; } - public function entityDelete(string|int $collection, string|int $identifier): EntityResource { + public function entityDelete(string|int|null $collection, string|int $identifier): EntityResource { // null collection is root if ($collection === null) { $collection = self::ROOT_ID; @@ -493,7 +493,7 @@ class PersonalService implements ServiceBaseInterface, ServiceCollectionMutableI return $entity; } - public function entityDelta(string|int $collection, string $signature, string $detail = 'ids'): Delta { + public function entityDelta(string|int|null $collection, string $signature, string $detail = 'ids'): Delta { // null collection is root if ($collection === null) { $collection = self::ROOT_ID;