diff --git a/src/Entity/Base/AttachmentsTrait.php b/src/Entity/Base/AttachmentsTrait.php index c7dc7a18..53c1fc36 100644 --- a/src/Entity/Base/AttachmentsTrait.php +++ b/src/Entity/Base/AttachmentsTrait.php @@ -32,8 +32,12 @@ use Symfony\Component\Serializer\Annotation\Groups; * * Requirements: * - Class using this trait should have $id property (e.g., via DBElementTrait) - * - Class may optionally have $master_picture_attachment property (via MasterAttachmentTrait) + * - Class using this trait should use MasterAttachmentTrait for full functionality * - Class should implement HasAttachmentsInterface + * + * Note: This trait has an optional dependency on MasterAttachmentTrait. + * If MasterAttachmentTrait is used, the removeAttachment and cloneAttachments methods + * will handle master picture attachment properly. Otherwise, those checks are no-ops. */ trait AttachmentsTrait { diff --git a/src/Entity/Base/StructuralElementTrait.php b/src/Entity/Base/StructuralElementTrait.php index f8a2cabb..728ef09c 100644 --- a/src/Entity/Base/StructuralElementTrait.php +++ b/src/Entity/Base/StructuralElementTrait.php @@ -92,7 +92,7 @@ trait StructuralElementTrait * Alternative names (semicolon-separated) for this element, which can be used for searching (especially for info provider system) */ #[ORM\Column(type: Types::TEXT, nullable: true, options: ['default' => null])] - private ?string $alternative_names = null; + private ?string $alternative_names = ''; /** * Initialize structural element collections. @@ -189,7 +189,7 @@ trait StructuralElementTrait * * The level of the root node is -1. * - * @return int the level of this element (zero means a most top element + * @return int the level of this element (zero means the topmost element * [a sub element of the root node]) */ public function getLevel(): int diff --git a/src/Entity/Contracts/StructuralElementInterface.php b/src/Entity/Contracts/StructuralElementInterface.php index d4a17181..9743c9dd 100644 --- a/src/Entity/Contracts/StructuralElementInterface.php +++ b/src/Entity/Contracts/StructuralElementInterface.php @@ -64,7 +64,7 @@ interface StructuralElementInterface * * The level of the root node is -1. * - * @return int the level of this element (zero means a most top element) + * @return int the level of this element (zero means the topmost element) */ public function getLevel(): int; }