EntityModel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTableName() 0 4 1
A fields() 0 4 1
1
<?php
2
3
namespace Hechoenlaravel\JarvisFoundation\EntityGenerator;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * Class EntityModel
9
 * @package Hechoenlaravel\JarvisFoundation\EntityGenerator
10
 */
11
class EntityModel extends Model
12
{
13
    /**
14
     * @var string
15
     */
16
    protected $table = "app_entities";
17
18
    /**
19
     * @var array
20
     */
21
    protected $fillable = [
22
        'namespace',
23
        'name',
24
        'slug',
25
        'description',
26
        'prefix',
27
        'table_name',
28
        'locked',
29
        'create_table'
30
    ];
31
32
    /**
33
     * Get the Table name for the Entity
34
     * @return string
35
     */
36
    public function getTableName()
37
    {
38
        return $this->table_name;
39
    }
40
41
    public function fields()
42
    {
43
        return $this->hasMany('Hechoenlaravel\JarvisFoundation\FieldGenerator\FieldModel', 'entity_id');
44
    }
45
}
46