Passed
Push — master ( 200f25...95aa98 )
by Robson
01:25
created

User   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 0
f 0
dl 0
loc 13
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A fullName() 0 3 1
1
<?php
2
3
namespace Example\Models;
4
5
use CoffeeCode\DataLayer\DataLayer;
6
7
/**
8
 * Class User
9
 * @package Example\Models
10
 */
11
class User extends DataLayer
12
{
13
    /**
14
     * User constructor.
15
     */
16
    public function __construct()
17
    {
18
        parent::__construct("users", ["first_name", "last_name"]);
19
    }
20
21
    public function fullName()
22
    {
23
        return "{$this->first_name} {$this->last_name}";
0 ignored issues
show
Bug Best Practice introduced by
The property first_name does not exist on Example\Models\User. Since you implemented __get, consider adding a @property annotation.
Loading history...
Bug Best Practice introduced by
The property last_name does not exist on Example\Models\User. Since you implemented __get, consider adding a @property annotation.
Loading history...
24
    }
25
}