AppleNotification   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A storeNotification() 0 9 1
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