Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public function updateOrderFormAddress(&$form) |
||
8 | { |
||
9 | $nextButton = new FormAction('saveAddressAndSkipSubscriptionStep', 'Confirm and Pay'); |
||
10 | $nextButton->addExtraClass('next'); |
||
11 | $subsButton = new FormAction('saveAddressAndCreateSubscription', 'Create Subscription'); |
||
12 | $subsButton->addExtraClass('next'); |
||
13 | $actions = FieldList::create($subsButton, $nextButton); |
||
14 | $form->setActions($actions); |
||
15 | } |
||
16 | |||
38 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.