Test Failed
Pull Request — master (#9)
by Maximo
03:13
created

LanguagesController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 26
ccs 0
cts 5
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
0 ignored issues
show
Coding Style introduced by
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
declare(strict_types=1);
3
4
namespace Gewaer\Api\Controllers;
5
6
use Gewaer\Models\Languages;
7
8
/**
9
 * Base controller
10
 *
11
 */
12
class LanguagesController extends BaseController
13
{
14
    /*
15
     * fields we accept to create
16
     *
17
     * @var array
18
     */
19
    protected $createFields = [];
20
21
    /*
22
     * fields we accept to create
23
     *
24
     * @var array
25
     */
26
    protected $updateFields = [];
27
28
    /**
29
     * set objects
30
     *
31
     * @return void
32
     */
33
    public function onConstruct()
34
    {
35
        $this->model = new Languages();
0 ignored issues
show
Documentation Bug introduced by
It seems like new Gewaer\Models\Languages() of type Gewaer\Models\Languages is incompatible with the declared type array of property $model.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
36
        $this->additionalSearchFields = [
37
            ['is_deleted', ':', 0],
38
        ];
39
    }
40
}
41