File tree Expand file tree Collapse file tree 15 files changed +30
-25
lines changed
resources/views/components/tree-node Expand file tree Collapse file tree 15 files changed +30
-25
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public function updatedUploads(): void
122122 ->toArray ();
123123 }
124124
125- public function saveChild ()
125+ public function saveChild (): void
126126 {
127127 if ($ this ->isDirty ()) {
128128 $ validated = $ this ->childForm ->validate ();
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public function updatedUploads(): void
107107 ->toArray ();
108108 }
109109
110- public function saveFather ()
110+ public function saveFather (): void
111111 {
112112 if ($ this ->isDirty ()) {
113113 $ validated = $ this ->fatherForm ->validate ();
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public function updatedUploads(): void
107107 ->toArray ();
108108 }
109109
110- public function saveMother ()
110+ public function saveMother (): void
111111 {
112112 if ($ this ->isDirty ()) {
113113 $ validated = $ this ->motherForm ->validate ();
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ public function updatedUploads(): void
114114 ->toArray ();
115115 }
116116
117- public function savePartner ()
117+ public function savePartner (): void
118118 {
119119 if ($ this ->isDirty ()) {
120120 $ validated = $ this ->partnerForm ->validate ();
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public function updatedUploads(): void
8888 ->toArray ();
8989 }
9090
91- public function savePerson ()
91+ public function savePerson (): void
9292 {
9393 if ($ this ->isDirty ()) {
9494 $ validated = $ this ->personForm ->validate ();
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ public function updatedUploads(): void
8686 ->toArray ();
8787 }
8888
89- public function save ()
89+ public function save (): void
9090 {
9191 foreach ($ this ->uploads as $ upload ) {
9292 $ file = $ this ->person ->addMedia ($ upload )->toMediaCollection ('files ' , 'files ' );
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public function confirmDeletion(): void
3131 $ this ->deleteConfirmed = true ;
3232 }
3333
34- public function deletePerson ()
34+ public function deletePerson (): void
3535 {
3636 if ($ this ->person ->isDeletable ()) {
3737 $ this ->deletePersonPhotos ();
@@ -46,9 +46,11 @@ public function deletePerson()
4646
4747 private function deletePersonPhotos (): void
4848 {
49- foreach (config ('app.photo_folders ' ) as $ folder ) {
50- File::delete (File::glob (storage_path ("app/public/ {$ folder }/ " . $ this ->person ->team_id . '/ ' . $ this ->person ->id . '_*.webp ' )));
51- }
49+ defer (function (): void {
50+ foreach (config ('app.photo_folders ' ) as $ folder ) {
51+ File::delete (File::glob (storage_path ("app/public/ {$ folder }/ " . $ this ->person ->team_id . '/ ' . $ this ->person ->id . '_*.webp ' )));
52+ }
53+ });
5254 }
5355
5456 // ------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public function getActivitylogOptions(): LogOptions
5959 ->dontSubmitEmptyLogs ();
6060 }
6161
62- public function tapActivity (Activity $ activity , string $ eventName )
62+ public function tapActivity (Activity $ activity , string $ eventName ): void
6363 {
6464 $ activity ->team_id = auth ()->user ()?->currentTeam?->id ?? null ;
6565 }
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ public function getActivitylogOptions(): LogOptions
111111 ->dontSubmitEmptyLogs ();
112112 }
113113
114- public function tapActivity (Activity $ activity , string $ eventName )
114+ public function tapActivity (Activity $ activity , string $ eventName ): void
115115 {
116116 $ activity ->team_id = auth ()->user ()?->currentTeam?->id ?? null ;
117117 }
@@ -547,7 +547,7 @@ public function getMetadataValue($key = null): ?string
547547 }
548548
549549 /* updates, deletes if empty or creates 1 to n METADATA related to the person */
550- public function updateMetadata (Collection $ personMetadata )
550+ public function updateMetadata (Collection $ personMetadata ): void
551551 {
552552 // First, delete any existing metadata where the value is empty
553553 foreach (PersonMetadata::METADATA_KEYS as $ key ) {
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function getActivitylogOptions(): LogOptions
4545 ->dontSubmitEmptyLogs ();
4646 }
4747
48- public function tapActivity (Activity $ activity , string $ eventName )
48+ public function tapActivity (Activity $ activity , string $ eventName ): void
4949 {
5050 $ activity ->team_id = auth ()->user ()?->currentTeam?->id ?? null ;
5151 }
You can’t perform that action at this time.
0 commit comments