Skip to content

Commit 9102290

Browse files
authored
Merge pull request #20 from YieldStudio/18-command-check-expo-tickets-error-json_decode-argument-1-$json-must-be-of-type-string-array-given
Prevent json_decode on responseItem details which is array
2 parents 407391d + 0d5fc1d commit 9102290

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Dto/ExpoMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @author David Tang<[email protected]>
1515
* @author James Hemery<[email protected]>
1616
*/
17-
final class ExpoMessage implements Jsonable, Arrayable
17+
final class ExpoMessage implements Arrayable, Jsonable
1818
{
1919
public array $to;
2020

src/ExpoNotificationsService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function receipts(Collection|array $tokenIds): Collection
121121
if ($responseItem['status'] === ExpoResponseStatus::ERROR->value) {
122122
$data
123123
->message($responseItem['message'])
124-
->details(json_decode($responseItem['details'], true));
124+
->details($responseItem['details']);
125125
}
126126

127127
return $data;

src/Jobs/CheckTickets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
class CheckTickets
1818
{
1919
use Dispatchable;
20-
use SerializesModels;
2120
use Queueable;
21+
use SerializesModels;
2222

2323
public function handle(
2424
ExpoNotificationsService $expoNotificationsService,

src/Jobs/SendPendingNotifications.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
class SendPendingNotifications
1515
{
1616
use Dispatchable;
17-
use SerializesModels;
1817
use Queueable;
18+
use SerializesModels;
1919

2020
public function handle(
2121
ExpoNotificationsService $expoNotificationsService,

0 commit comments

Comments
 (0)