Address additional code review feedback: trait dependencies and grammar

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-02 23:55:40 +00:00
parent 47d677b5db
commit 12f5c4e14d
3 changed files with 8 additions and 4 deletions

View file

@ -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
{

View file

@ -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

View file

@ -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;
}