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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A ads() 0 3 1
A setConfigAttribute() 0 3 1
A getConfigAttribute() 0 3 1
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