AppleNotification::storeNotification()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Appvise\AppStoreNotifications\Model;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class AppleNotification extends Model
8
{
9
    public $guarded = [];
10
11
    protected $casts = [
12
        'payload' => 'array',
13
    ];
14
15
    public static function storeNotification(string $notificationType, array $notificationPayload)
16
    {
17
        return self::create(
18
            [
19
            'type' => $notificationType,
20
            'payload' => $notificationPayload,
21
            ]
22
        );
23
    }
24
}
25