Completed
Push — master ( 4d49f2...b9481e )
by Prateek
05:48 queued 03:41
created

Module   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getModelNamePlural() 0 3 1
A getName() 0 3 1
A getModelName() 0 3 1
A __construct() 0 5 1
A getData() 0 3 1
A getModuleName() 0 3 1
1
<?php
2
3
namespace Prateekkarki\Laragen\Models;
4
5
class Module
6
{
7
    protected $module;
8
9
    protected $data;
10
11
    protected $images;
12
13
    protected $name;
14
15
    public function __construct($module)
16
    {
17
        $this->module = (object)$module;
18
        $this->data   = $this->module->data;
19
        $this->name   = $this->module->name;
20
    }
21
22
    public function getName()
23
    {
24
        return $this->name;
25
    }
26
27
    public function getData()
28
    {
29
        return $this->data;
30
    }
31
32
    public function getModuleName()
33
    {
34
        return $this->name;
35
    }
36
37
    public function getModelName()
38
    {
39
        return ucfirst(camel_case(str_singular($this->name)));
40
    }
41
42
    public function getModelNamePlural()
43
    {
44
        return ucfirst(camel_case($this->name));
45
    }
46
}
47