Emoji   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A created_by() 0 4 1
A keywords() 0 4 1
1
<?php
2
3
/**
4
 * @author: Raimi Ademola <[email protected]>
5
 * @copyright: 2016 Andela
6
 */
7
namespace Demo;
8
9
use Illuminate\Database\Eloquent\Model;
10
11
class Emoji extends Model
12
{
13
    protected $fillable = ['name', 'chars', 'category', 'created_at', 'created_by', 'updated_at'];
14
15
    /**
16
     * Get emoji creator.
17
     */
18
    public function created_by()
19
    {
20
        return $this->hasOne('Demo\User', 'username', 'created_by');
21
    }
22
23
    /**
24
     * Get emoji keywords.
25
     */
26
    public function keywords()
27
    {
28
        return $this->hasMany('Demo\Keyword');
29
    }
30
}
31