GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Setup Failed
Branch master (41c46a)
by Nikhil
09:01 queued 21s
created

Notification   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 4
c 3
b 0
f 1
lcom 0
cbo 1
dl 0
loc 46
ccs 0
cts 16
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A notifiable() 0 4 1
A scopePending() 0 4 1
A scopeDismissed() 0 4 1
A dismiss() 0 4 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent;
6
7
class Notification extends Eloquent\Model
8
{
9
    /**
10
     * The attributes that are not mass assignable.
11
     *
12
     * @var array
13
     */
14
    protected $guarded = [];
15
16
    /**
17
     * @return \Illuminate\Database\Eloquent\Relations\MorphTo
18
     */
19
    public function notifiable()
20
    {
21
        return $this->morphTo();
22
    }
23
24
    /**
25
     * @param $query
26
     *
27
     * @return Eloquent\Builder
28
     */
29
    public function scopePending($query)
30
    {
31
        return $query->whereDismissed(false);
32
    }
33
34
    /**
35
     * @param $query
36
     *
37
     * @return Eloquent\Builder
38
     */
39
    public function scopeDismissed($query)
40
    {
41
        return $query->whereDismissed(true);
42
    }
43
44
    /**
45
     * Dismiss the notification.
46
     * @return bool|int
47
     */
48
    public function dismiss()
49
    {
50
        return $this->update(['dismissed' => true]);
51
    }
52
}
53