User   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A emoji() 0 4 1
1
<?php
2
/**
3
 * @author   Temitope Olotin <[email protected]>
4
 * @license  <https://opensource.org/license/MIT> MIT
5
 */
6
namespace Laztopaz\EmojiRestfulAPI;
7
8
use Illuminate\Database\Eloquent\Model;
9
10
class User extends Model
11
{
12
    protected $fillable = ['firstname', 'lastname', 'username', 'email', 'password', 'created_by', 'created_at', 'updated_at'];
13
14
    /**
15
     * Get creator of an emoji.
16
     */
17
    public function emoji()
18
    {
19
        return $this->hasMany('Laztopaz\EmojiRestfulAPI\Emoji', 'created_by', 'id');
20
    }
21
}
22