Test Failed
Pull Request — master (#21)
by Maximo
04:17
created

RolesAccesListController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 29
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A onConstruct() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gewaer\Api\Controllers;
6
7
use Gewaer\Models\AccessList;
8
9
/**
10
 * Class RolesController
11
 *
12
 * @package Gewaer\Api\Controllers
13
 *
14
 * @property Users $userData
15
 */
16
class RolesAccesListController extends BaseController
17
{
18
    /*
19
     * fields we accept to create
20
     *
21
     * @var array
22
     */
23
    protected $createFields = [];
24
25
    /*
26
     * fields we accept to create
27
     *
28
     * @var array
29
     */
30
    protected $updateFields = [];
31
32
    /**
33
     * set objects
34
     *
35
     * @return void
36
     */
37
    public function onConstruct()
38
    {
39
        $this->model = new AccessList();
40
41
        //get the list of roes for the systema + my company
42
        $this->additionalSearchFields = [
43
            ['is_deleted', ':', 0],
44
            ['apps_id', ':', $this->app->getId()],
0 ignored issues
show
Bug Best Practice introduced by
The property app does not exist on Gewaer\Api\Controllers\RolesAccesListController. Since you implemented __get, consider adding a @property annotation.
Loading history...
45
        ];
46
    }
47
}
48