Skip to content

Commit

Permalink
Add some Types
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanzweifel committed Mar 26, 2024
1 parent 886a65a commit f527a5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Listeners/StoreOutgoingMailListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ protected function getModels(MessageSent $event): Collection

$models = decrypt($headerValue->getBodyAsString());

return collect(json_decode($models, true, 512, JSON_THROW_ON_ERROR))
/** @var array<array<string, mixed>> $modelsArray */
$modelsArray = json_decode($models, true, 512, JSON_THROW_ON_ERROR);

return collect($modelsArray)
->map(function (array $tuple): Model {
$model = $tuple['model'];
$id = $tuple['id'];
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Send.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Send extends Model
'rejected_at' => 'immutable_datetime',
];

protected static function newFactory()
protected static function newFactory(): SendFactory
{
return new SendFactory();
}
Expand Down

0 comments on commit f527a5d

Please sign in to comment.