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

MongoDataProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 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