onConstruct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
ccs 0
cts 6
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Canvas\Api\Controllers;
6
7
use Canvas\Models\ResourcesAccesses;
8
9
/**
10
 * Class AclResourcesController
11
 *
12
 * @package Canvas\Api\Controllers
13
 *
14
 * @property Users $userData
15
 * @property Apps $app
16
 */
17
class PermissionsResourcesAccessController extends BaseController
18
{
19
    /*
20
     * fields we accept to create
21
     *
22
     * @var array
23
     */
24
    protected $createFields = [];
25
26
    /*
27
     * fields we accept to create
28
     *
29
     * @var array
30
     */
31
    protected $updateFields = [];
32
33
    /**
34
     * set objects
35
     *
36
     * @return void
37
     */
38
    public function onConstruct()
39
    {
40
        $this->model = new ResourcesAccesses();
0 ignored issues
show
Bug Best Practice introduced by
The property model does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
41
42
        //get the list of roes for the systema + my company
43
        $this->additionalSearchFields = [
0 ignored issues
show
Bug Best Practice introduced by
The property additionalSearchFields does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
44
            ['is_deleted', ':', '0'],
45
            ['apps_id', ':', $this->app->getId()],
46
        ];
47
    }
48
}
49