Test Failed
Pull Request — master (#80)
by Maximo
05:46
created

LanguagesController::onConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Gewaer\Api\Controllers;
6
7
use Gewaer\Models\Languages;
8
9
/**
10
 * Class LanguagesController
11
 *
12
 * @package Gewaer\Api\Controllers
13
 *
14
 */
15
class LanguagesController extends BaseController
16
{
17
    /*
18
     * fields we accept to create
19
     *
20
     * @var array
21
     */
22
    protected $createFields = [];
23
24
    /*
25
     * fields we accept to create
26
     *
27
     * @var array
28
     */
29
    protected $updateFields = [];
30
31
    /**
32
     * set objects
33
     *
34
     * @return void
35
     */
36
    public function onConstruct()
37
    {
38
        $this->model = new Languages();
39
        $this->additionalSearchFields = [
40
            ['is_deleted', ':', '0'],
41
        ];
42
    }
43
}
44