updateCMSFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
4
5
/**
6
 * adds functionality to Products
7
 *
8
 *
9
 *
10
 */
11
class ProductQuestion_ProductVariationsAdditions extends DataExtension
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
12
{
13
    private static $many_many = array(
0 ignored issues
show
Unused Code introduced by
The property $many_many is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
14
        'ProductAttributeTypes' => 'ProductAttributeType',
15
        'ProductAttributeValues' => 'ProductAttributeValue',
16
        'ProductVariations' => 'ProductVariation'
17
    );
18
19
    public function updateCMSFields(FieldList $fields)
20
    {
21
    }
22
23
    public function onAfterWrite()
24
    {
25
        //go through types to add to variations
26
        //go through values to add to variations
27
    }
28
}
29