File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,8 @@ public function getAvailable(): bool
8484 public function unserialize (?array $ data ): self
8585 {
8686 if (!empty ($ data ['id ' ])) {
87- $ this ->setSequentialId ($ data ['id ' ]);
87+ $ sequentialId = (int )$ data ['id ' ];
88+ $ this ->setSequentialId ($ sequentialId );
8889 }
8990
9091 if (!empty ($ data ['item_uuid ' ])) {
@@ -96,13 +97,15 @@ public function unserialize(?array $data): self
9697 }
9798
9899 if (!empty ($ data ['price ' ])) {
99- $ this ->setPrice ($ data ['price ' ]);
100+ $ price = (float )$ data ['price ' ];
101+ $ this ->setPrice ($ price );
100102 }
101103
102104 if (!empty ($ data ['available ' ])) {
103- $ this ->setAvailable ($ data ['available ' ]);
105+ $ isAvailable = (bool )$ data ['available ' ];
106+ $ this ->setAvailable ($ isAvailable );
104107 }
105108
106109 return $ this ;
107110 }
108- }
111+ }
Original file line number Diff line number Diff line change @@ -125,7 +125,8 @@ public function getCreationDate(): ?string
125125 public function unserialize (?array $ data ): self
126126 {
127127 if (!empty ($ data ['id ' ])) {
128- $ this ->setSequentialId ($ data ['id ' ]);
128+ $ sequentialId = (int )$ data ['id ' ];
129+ $ this ->setSequentialId ($ sequentialId );
129130 }
130131
131132 if (!empty ($ data ['user_uuid ' ])) {
You can’t perform that action at this time.
0 commit comments