CurrenciesController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 36
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0
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\Currencies;
8
9
/**
10
 * Class LanguagesController.
11
 *
12
 * @package Canvas\Api\Controllers
13
 *
14
 */
15
class CurrenciesController extends BaseController
16
{
17
    /*
18
     * fields we accept to create
19
     *
20
     * @var array
21
     */
22
    protected $createFields = [
23
        'country',
24
        'currency',
25
        'code',
26
        'symbol'
27
    ];
28
29
    /*
30
     * fields we accept to create
31
     *
32
     * @var array
33
     */
34
    protected $updateFields = [
35
        'country',
36
        'currency',
37
        'code',
38
        'symbol'
39
    ];
40
41
    /**
42
     * set objects.
43
     *
44
     * @return void
45
     */
46
    public function onConstruct()
47
    {
48
        $this->model = new Currencies();
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...
49
        $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...
50
            ['is_deleted', ':', '0'],
51
        ];
52
    }
53
}
54