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
last_name does not exist on Example\Models\User . Since you implemented __get , consider adding a @property annotation.
![]() |
|||
24 | } |
||
25 | } |