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::dismiss()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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