Completed
Push — master ( ec1997...dcb85b )
by Edgar
10:53
created

MongoDataProvider::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 7
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
namespace nstdio\yii2notymo\provider;
3
4
use yii\mongodb\Query;
5
6
/**
7
 * Class MongoDataProvider
8
 *
9
 * @package nstdio\yii2notymo\provider
10
 * @author  Edgar Asatryan <[email protected]>
11
 */
12
class MongoDataProvider extends DataProvider
13
{
14
    /**
15
     * DataProvider constructor.
16
     *
17
     * @param array $config
18
     *
19
     */
20
    public function __construct($config = [])
21
    {
22
        parent::__construct($config);
23
24
25
        $this->query = new Query();
0 ignored issues
show
Documentation Bug introduced by
It seems like new \yii\mongodb\Query() of type object<yii\mongodb\Query> is incompatible with the declared type object<yii\db\Query> of property $query.

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...
26
    }
27
}
28