Passed
Pull Request — master (#54)
by Rafael
06:51
created

LanguagesController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 26
ccs 3
cts 3
cp 1
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 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 1
    public function onConstruct()
37
    {
38 1
        $this->model = new Languages();
39 1
        $this->additionalSearchFields = [
40
            ['is_deleted', ':', '0'],
41
        ];
42 1
    }
43
}
44