GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 3732bd...eba618 )
by Ivan
10:11
created

WishlistProduct   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tableName() 0 4 1
A rules() 0 19 1
A getProduct() 0 4 1
1
<?php
2
3
namespace app\modules\shop\models;
4
5
use yii\db\ActiveRecord;
6
use Yii;
7
use app\modules\shop\models\Product;
8
9
/**
10
 * This is the model class for table "{{%wishlist_product}}".
11
 * Model fields:
12
 * @property integer $id
13
 * @property integer $wishlist_id
14
 * @property integer $product_id
15
 * Relations:
16
 * @property Product $product
17
 */
18
class WishlistProduct extends ActiveRecord
19
{
20
    /**
21
     * @inheritdoc
22
     */
23
    public static function tableName()
24
    {
25
        return '{{%wishlist_product}}';
26
    }
27
28
    /**
29
     * @inheritdoc
30
     */
31
    public function rules()
32
    {
33
        return [
34
            [
35
                [
36
                    'wishlist_id',
37
                    'product_id',
38
                ],
39
                'required'
40
            ],
41
            [
42
                [
43
                    'wishlist_id',
44
                    'product_id',
45
                ],
46
                'integer'
47
            ],
48
        ];
49
    }
50
51
    public function getProduct()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
52
    {
53
        return $this->hasOne(Product::className(), ['id' => 'product_id']);
54
    }
55
}
56