Test Failed
Push — master ( c223c8...a9e334 )
by Maximo
01:54
created

UsersController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A onConstruct() 0 3 1
1
<?php
0 ignored issues
show
Coding Style introduced by
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
3
declare(strict_types=1);
4
5
namespace Gewaer\Api\Controllers;
6
7
use Gewaer\Models\Users;
8
9
/**
10
 * Base controller
11
 *
12
 */
13
class UsersController extends \Baka\Auth\UsersController
14
{
15
    /*
16
     * fields we accept to create
17
     *
18
     * @var array
19
     */
20
    protected $createFields = ['name', 'firstname', 'lastname', 'displayname', 'email', 'password', 'created_at', 'updated_at', 'default_company', 'family'];
21
22
    /*
23
     * fields we accept to create
24
     *
25
     * @var array
26
     */
27
    protected $updateFields = ['name', 'firstname', 'lastname', 'displayname', 'email', 'password', 'created_at', 'updated_at', 'default_company'];
28
29
    /**
30
     * set objects
31
     *
32
     * @return void
33
     */
34
    public function onConstruct()
35
    {
36
        $this->model = new Users();
0 ignored issues
show
Documentation Bug introduced by
It seems like new Gewaer\Models\Users() of type Gewaer\Models\Users is incompatible with the declared type array of property $model.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
37
    }
38
}
39