Passed
Push — master ( 2c7b25...f52af3 )
by Mihail
05:14
created

UserNotification   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
1
<?php
2
3
namespace Apps\ActiveRecord;
4
5
6
use Ffcms\Core\Arch\ActiveModel;
7
8
/**
9
 * Class UserNotification. Active record model for user notifications
10
 * @package Apps\ActiveRecord
11
 * @property int $id
12
 * @property int $user_id
13
 * @property string $msg
14
 * @property string $uri
15
 * @property string $vars
16
 * @property int $readed
17
 * @property string $created_at
18
 * @property string $updated_at
19
 */
20
class UserNotification extends ActiveModel
21
{
22
    /**
23
     * Get user object as relation
24
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
25
     */
26
    public function user()
27
    {
28
        return $this->belongsTo('Apps\ActiveRecord\User');
29
    }
30
}