File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ public function getPrice(): string
270270 return $ this ->price ;
271271 }
272272
273- public function getScts (): string
273+ public function getScts (): ? string
274274 {
275275 return $ this ->scts ;
276276 }
Original file line number Diff line number Diff line change @@ -29,7 +29,10 @@ class Factory extends WebhookFactory
2929 */
3030 public static function createFromArray (array $ data )
3131 {
32- if (array_key_exists ('scts ' , $ data )) {
32+ // We are dealing with only two webhooks here. One has the text field, one does not.
33+ // A sort of if/else style block here smells a bit, ideally the backend needs to change.
34+
35+ if (!array_key_exists ('text ' , $ data )) {
3336 return new DeliveryReceipt ($ data );
3437 }
3538
You can’t perform that action at this time.
0 commit comments