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.

Platform::ads()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * App\Platform
9
 *
10
 * @mixin \Eloquent
11
 * @property int $id
12
 * @property string $type
13
 * @property string|array $config
14
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Platform whereId($value)
15
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Platform whereType($value)
16
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Platform whereConfig($value)
17
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Platform find($value)
18
 */
19
class Platform extends Model
20
{
21
    protected $fillable = ['config'];
22
23
    public $timestamps = false;
24
25
    public function ads()
26
    {
27
        return $this->belongsToMany(Ad::class, 'ad_platforms')->withPivot('publication_item_id');
28
    }
29
30
    public function getConfigAttribute($value)
31
    {
32
        return unserialize($value);
33
    }
34
35
    public function setConfigAttribute($value)
36
    {
37
        $this->attributes['config'] = serialize($value);
38
    }
39
}
40