Passed
Push — master ( 6475c1...2a0745 )
by Maximo
03:27 queued 14s
created

LocalesController   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\Locales;
8
9
/**
10
 * Class LanguagesController
11
 *
12
 * @package Gewaer\Api\Controllers
13
 *
14
 */
15
class LocalesController extends BaseController
16
{
17
    /*
18
     * fields we accept to create
19
     *
20
     * @var array
21
     */
22
    protected $createFields = ['name'];
23
24
    /*
25
     * fields we accept to create
26
     *
27
     * @var array
28
     */
29
    protected $updateFields = ['name'];
30
31
    /**
32
     * set objects
33
     *
34
     * @return void
35
     */
36 5
    public function onConstruct()
37
    {
38 5
        $this->model = new Locales();
39 5
        $this->additionalSearchFields = [
40
            ['is_deleted', ':', '0'],
41
        ];
42 5
    }
43
}
44