diff --git a/shared/lib/People/Collection/CollectionPropertiesBaseAbstract.php b/shared/lib/People/Collection/CollectionPropertiesBaseAbstract.php index f3e25e2..95a10e0 100644 --- a/shared/lib/People/Collection/CollectionPropertiesBaseAbstract.php +++ b/shared/lib/People/Collection/CollectionPropertiesBaseAbstract.php @@ -20,17 +20,15 @@ use KTXF\Resource\Provider\Node\NodePropertiesBaseAbstract; */ abstract class CollectionPropertiesBaseAbstract extends NodePropertiesBaseAbstract implements CollectionPropertiesBaseInterface { - public const JSON_TYPE = CollectionPropertiesBaseInterface::JSON_TYPE; - /** * @inheritDoc */ public function content(): array { $content = $this->data[self::PROPERTY_CONTENT] ?? null; if (is_array($content)) { - return array_map(function ($item) { - return new CollectionContent($item); - }, $content); + return array_filter(array_map(function ($item) { + return $item instanceof CollectionContent ? $item : CollectionContent::tryFrom($item); + }, $content)); } else { return []; } diff --git a/shared/lib/People/Collection/CollectionPropertiesBaseInterface.php b/shared/lib/People/Collection/CollectionPropertiesBaseInterface.php index 30c0ce3..8a92c66 100644 --- a/shared/lib/People/Collection/CollectionPropertiesBaseInterface.php +++ b/shared/lib/People/Collection/CollectionPropertiesBaseInterface.php @@ -10,7 +10,6 @@ declare(strict_types=1); namespace KTXF\People\Collection; use KTXF\Resource\Provider\Node\NodePropertiesBaseInterface; -use PhpParser\Node\Expr\Array_; interface CollectionPropertiesBaseInterface extends NodePropertiesBaseInterface { diff --git a/shared/lib/People/Provider/ProviderServiceTestInterface.php b/shared/lib/People/Provider/ProviderServiceTestInterface.php index a0e76a2..9fe6a5b 100644 --- a/shared/lib/People/Provider/ProviderServiceTestInterface.php +++ b/shared/lib/People/Provider/ProviderServiceTestInterface.php @@ -9,8 +9,8 @@ declare(strict_types=1); namespace KTXF\People\Provider; -use KTXF\Chrono\Service\ServiceMutableInterface; -use KTXF\Mail\Service\ServiceBaseInterface; +use KTXF\People\Service\ServiceBaseInterface; +use KTXF\People\Service\ServiceMutableInterface; /** * Provider Service Test Interface diff --git a/shared/lib/People/Service/ServiceBaseInterface.php b/shared/lib/People/Service/ServiceBaseInterface.php index 7dcf2ae..bb32c74 100644 --- a/shared/lib/People/Service/ServiceBaseInterface.php +++ b/shared/lib/People/Service/ServiceBaseInterface.php @@ -21,7 +21,7 @@ use KTXF\Resource\Range\RangeType; use KTXF\Resource\Sort\ISort; /** - * People Service Base Interface + * Service Base Interface * * Minimum interface for a service, providing read-only access to collections and entities. * diff --git a/shared/lib/People/Service/ServiceCollectionMutableInterface.php b/shared/lib/People/Service/ServiceCollectionMutableInterface.php index 8eaaf6d..e507f62 100644 --- a/shared/lib/People/Service/ServiceCollectionMutableInterface.php +++ b/shared/lib/People/Service/ServiceCollectionMutableInterface.php @@ -15,7 +15,7 @@ use KTXF\People\Collection\CollectionPropertiesBaseInterface; use KTXF\Resource\Identifier\CollectionIdentifierInterface; /** - * People Service Collection Mutable Interface + * Service Collection Mutable Interface * * Optional interface for services that support collection CRUD operations. *