ProductQuestion_ProductVariationsAdditions   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A updateCMSFields() 0 3 1
A onAfterWrite() 0 5 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