Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 4.1909 |
Changes | 0 |
1 | <?php |
||
16 | 1 | public function updatePurchaseFormFields(FieldList $fields) |
|
17 | { |
||
18 | 1 | if ($this->owner->getProduct()->CartExpiration) { |
|
19 | $fields->insertBefore( |
||
20 | 'quantity', |
||
21 | HiddenField::create('expires') |
||
22 | ->setValue( |
||
23 | ProductPage::getGeneratedValue( |
||
24 | $this->owner->getProduct()->Code, |
||
25 | 'expires', |
||
26 | $this->owner->getProduct()->ExpirationMinutes, |
||
27 | 'value' |
||
28 | ) |
||
34 |