File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ public function removeAttachment(Attachment $attachment): self
8686 $ this ->attachments ->removeElement ($ attachment );
8787
8888 //Check if this is the master attachment -> remove it from master attachment too, or it can not be deleted from DB...
89- if (isset ( $ this ->master_picture_attachment ) && $ attachment === $ this ->master_picture_attachment ) {
89+ if ($ this ->master_picture_attachment !== null && $ attachment === $ this ->master_picture_attachment ) {
9090 $ this ->setMasterPictureAttachment (null );
9191 }
9292
@@ -104,7 +104,7 @@ protected function cloneAttachments(): void
104104 //Set master attachment is needed
105105 foreach ($ attachments as $ attachment ) {
106106 $ clone = clone $ attachment ;
107- if (isset ( $ this ->master_picture_attachment ) && $ attachment === $ this ->master_picture_attachment ) {
107+ if ($ this ->master_picture_attachment !== null && $ attachment === $ this ->master_picture_attachment ) {
108108 $ this ->setMasterPictureAttachment ($ clone );
109109 }
110110 $ this ->addAttachment ($ clone );
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ public function getAddress(): string
9494 }
9595
9696 /**
97- * Set the addres .
97+ * Set the address .
9898 *
9999 * @param string $new_address the new address (with "\n" as line break)
100100 *
Original file line number Diff line number Diff 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 = "" ;
95+ private ?string $ alternative_names = null ;
9696
9797 /**
9898 * Initialize structural element collections.
@@ -153,7 +153,7 @@ public function isRoot(): bool
153153 /**
154154 * Get the parent of this element.
155155 *
156- * @return static|null The parent element. Null if this element, does not have a parent.
156+ * @return static|null The parent element. Null if this element does not have a parent.
157157 */
158158 public function getParent (): ?self
159159 {
@@ -163,7 +163,7 @@ public function getParent(): ?self
163163 /**
164164 * Get the comment of the element as markdown encoded string.
165165 *
166- * @return string the comment
166+ * @return string|null the comment
167167 */
168168 public function getComment (): ?string
169169 {
You can’t perform that action at this time.
0 commit comments