CustomFieldsValuesController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 4
Bugs 0 Features 0
Metric Value
eloc 14
c 4
b 0
f 0
dl 0
loc 36
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A onConstruct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Canvas\Api\Controllers;
6
7
use Canvas\Models\CustomFieldsValues;
8
/**
9
 * Class LanguagesController.
10
 *
11
 * @package Canvas\Api\Controllers
12
 * @property Users $userData
13
 * @property Apps $app
14
 *
15
 */
16
class CustomFieldsValuesController extends BaseController
17
{
18
    /*
19
     * fields we accept to create
20
     *
21
     * @var array
22
     */
23
    protected $createFields = [
24
        'custom_fields_id',
25
        'label',
26
        'value',
27
        'is_default'
28
    ];
29
30
    /*
31
     * fields we accept to create
32
     *
33
     * @var array
34
     */
35
    protected $updateFields = [
36
        'custom_fields_id',
37
        'label',
38
        'value',
39
        'is_default'
40
    ];
41
42
    /**
43
     * set objects.
44
     *
45
     * @return void
46
     */
47
    public function onConstruct()
48
    {
49
        $this->model = new CustomFieldsValues();
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...
50
        $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...
51
            ['is_deleted', ':', '0'],
52
        ];
53
    }
54
}
55