Skip to content

Commit 12f5c4e

Browse files
Copilotjbtronics
andcommitted
Address additional code review feedback: trait dependencies and grammar
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
1 parent 47d677b commit 12f5c4e

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/Entity/Base/AttachmentsTrait.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@
3232
*
3333
* Requirements:
3434
* - Class using this trait should have $id property (e.g., via DBElementTrait)
35-
* - Class may optionally have $master_picture_attachment property (via MasterAttachmentTrait)
35+
* - Class using this trait should use MasterAttachmentTrait for full functionality
3636
* - Class should implement HasAttachmentsInterface
37+
*
38+
* Note: This trait has an optional dependency on MasterAttachmentTrait.
39+
* If MasterAttachmentTrait is used, the removeAttachment and cloneAttachments methods
40+
* will handle master picture attachment properly. Otherwise, those checks are no-ops.
3741
*/
3842
trait AttachmentsTrait
3943
{

src/Entity/Base/StructuralElementTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ trait StructuralElementTrait
9292
* Alternative names (semicolon-separated) for this element, which can be used for searching (especially for info provider system)
9393
*/
9494
#[ORM\Column(type: Types::TEXT, nullable: true, options: ['default' => null])]
95-
private ?string $alternative_names = null;
95+
private ?string $alternative_names = '';
9696

9797
/**
9898
* Initialize structural element collections.
@@ -189,7 +189,7 @@ public function setComment(string $new_comment): self
189189
*
190190
* The level of the root node is -1.
191191
*
192-
* @return int the level of this element (zero means a most top element
192+
* @return int the level of this element (zero means the topmost element
193193
* [a sub element of the root node])
194194
*/
195195
public function getLevel(): int

src/Entity/Contracts/StructuralElementInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function getFullPath(string $delimiter = ' → '): string;
6464
*
6565
* The level of the root node is -1.
6666
*
67-
* @return int the level of this element (zero means a most top element)
67+
* @return int the level of this element (zero means the topmost element)
6868
*/
6969
public function getLevel(): int;
7070
}

0 commit comments

Comments
 (0)