Failed Conditions
Push — master ( 07fe0e...591df0 )
by Maximo
01:08 queued 11s
created

UserConfigController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A onConstruct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Canvas\Api\Controllers;
6
7
use Canvas\Models\UserConfig;
8
use Phalcon\Http\Response;
9
10
/**
11
 * Class LanguagesController.
12
 *
13
 * @package Canvas\Api\Controllers
14
 * @property UserData $userData
15
 *
16
 */
17
class UserConfigController 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 UserConfig();
41
        $this->additionalSearchFields = [
42
            ['users_id', ':', $this->userData->getId()],
43
        ];
44
    }
45
}
46