Test Failed
Push — master ( 8314f3...393bed )
by Alexey
05:06
created

PriceTypeLink::relations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by IntelliJ IDEA.
4
 * User: inji
5
 * Date: 15.12.2017
6
 * Time: 16:59
7
 */
8
9
namespace Ecommerce\Card;
10
11
12
class PriceTypeLink extends \Model {
13
    static $cols = [
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $cols.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
14
        'card_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'card'],
15
        'item_offer_price_type_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'type'],
16
    ];
17
    static $dataManagers = [
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $dataManagers.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
18
        'manager' => [
19
            'cols' => ['card_id', 'item_offer_price_type_id']
20
        ]
21
    ];
22
    static $forms = [
0 ignored issues
show
Coding Style introduced by
The visibility should be declared for property $forms.

The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using

class A {
    var $property;
}

the property is implicitly global.

To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.

Loading history...
23
        'manager' => [
24
            'map' => [
25
                ['card_id', 'item_offer_price_type_id']
26
            ]
27
        ]
28
    ];
29
30
    static function relations() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
31
        return [
32
            'card' => [
33
                'model' => 'Ecommerce\Card',
34
                'col' => 'card_id'
35
            ],
36
            'type' => [
37
                'model' => 'Ecommerce\Item\Offer\Price\Type',
38
                'col' => 'item_offer_price_type_id'
39
            ]
40
        ];
41
    }
42
}