UserLog   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A user() 0 3 1
1
<?php
2
3
namespace Apps\ActiveRecord;
4
5
use Ffcms\Core\Arch\ActiveModel;
6
7
/**
8
 * Class UserLog. Active record model.
9
 * @property int $id
10
 * @property int $user_id
11
 * @property string $type
12
 * @property string $message
13
 * @property string $created_at
14
 * @property string $updated_at
15
 */
16
class UserLog extends ActiveModel
17
{
18
    protected $casts = [
19
        'id' => 'integer',
20
        'user_id' => 'integer',
21
        'type' => 'string',
22
        'message' => 'string'
23
    ];
24
25
    /**
26
     * Get user object as relation
27
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
28
     */
29
    public function user()
30
    {
31
        return $this->belongsTo(User::class);
32
    }
33
}
34