@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare( strict_types = 1 ); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace WMDE\Fundraising\Frontend\Factories; |
| 6 | 6 | |
@@ -34,23 +34,23 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | public function getAmountOption(): array { |
| 36 | 36 | if ( $this->featureToggle->featureIsActive( 'campaigns.amount_options.5to300_0' ) ) { |
| 37 | - return $this->getAmountOptionInEuros( [ 500, 1500, 2500, 5000, 7500, 10000, 25000, 30000 ] ); |
|
| 37 | + return $this->getAmountOptionInEuros( [500, 1500, 2500, 5000, 7500, 10000, 25000, 30000] ); |
|
| 38 | 38 | } elseif ( $this->featureToggle->featureIsActive( 'campaigns.amount_options.5to300' ) ) { |
| 39 | - return $this->getAmountOptionInEuros( [ 500, 1500, 2500, 5000, 7500, 10000, 25000, 30000 ] ); |
|
| 39 | + return $this->getAmountOptionInEuros( [500, 1500, 2500, 5000, 7500, 10000, 25000, 30000] ); |
|
| 40 | 40 | } elseif ( $this->featureToggle->featureIsActive( 'campaigns.amount_options.5to100' ) ) { |
| 41 | - return $this->getAmountOptionInEuros( [ 500, 1000, 1500, 2000, 3000, 5000, 7500, 10000 ] ); |
|
| 41 | + return $this->getAmountOptionInEuros( [500, 1000, 1500, 2000, 3000, 5000, 7500, 10000] ); |
|
| 42 | 42 | } elseif ( $this->featureToggle->featureIsActive( 'campaigns.amount_options.15to250' ) ) { |
| 43 | - return $this->getAmountOptionInEuros( [ 1500, 2000, 2500, 3000, 5000, 7500, 10000, 25000 ] ); |
|
| 43 | + return $this->getAmountOptionInEuros( [1500, 2000, 2500, 3000, 5000, 7500, 10000, 25000] ); |
|
| 44 | 44 | } elseif ( $this->featureToggle->featureIsActive( 'campaigns.amount_options.30to250' ) ) { |
| 45 | - return $this->getAmountOptionInEuros( [ 3000, 4000, 5000, 7500, 10000, 15000, 20000, 25000 ] ); |
|
| 45 | + return $this->getAmountOptionInEuros( [3000, 4000, 5000, 7500, 10000, 15000, 20000, 25000] ); |
|
| 46 | 46 | } elseif ( $this->featureToggle->featureIsActive( 'campaigns.amount_options.50to500' ) ) { |
| 47 | - return $this->getAmountOptionInEuros( [ 5000, 10000, 15000, 20000, 25000, 30000, 50000 ] ); |
|
| 47 | + return $this->getAmountOptionInEuros( [5000, 10000, 15000, 20000, 25000, 30000, 50000] ); |
|
| 48 | 48 | } |
| 49 | 49 | throw new UnknownChoiceDefinition( 'Amount option selection configuration failure.' ); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | public function getAmountOptionInEuros( array $amountOption ): array { |
| 53 | - return array_map( function ( int $amount ) { |
|
| 53 | + return array_map( function( int $amount ) { |
|
| 54 | 54 | return Euro::newFromCents( $amount ); |
| 55 | 55 | }, $amountOption ); |
| 56 | 56 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | public function getDefaultIncentives(): array { |
| 68 | 68 | if ( $this->featureToggle->featureIsActive( 'campaigns.membership_incentive.incentive' ) ) { |
| 69 | 69 | // TODO: This is currently hardcoded, we should make the list of incentives and defaults configurable |
| 70 | - return [ 'tote_bag' ]; |
|
| 70 | + return ['tote_bag']; |
|
| 71 | 71 | } elseif ( $this->featureToggle->featureIsActive( 'campaigns.membership_incentive.no_incentive' ) ) { |
| 72 | 72 | return []; |
| 73 | 73 | } |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare( strict_types = 1 ); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace WMDE\Fundraising\Frontend\Presentation\Presenters; |
| 6 | 6 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | return $this->template->render( [ |
| 20 | 20 | 'urls' => $urls, |
| 21 | 21 | 'showMembershipTypeOption' => $showMembershipTypeOption, |
| 22 | - 'initialFormValues' => array_merge( $initialDonationFormValues, [ 'incentives' => $this->incentives ] ), |
|
| 22 | + 'initialFormValues' => array_merge( $initialDonationFormValues, ['incentives' => $this->incentives] ), |
|
| 23 | 23 | 'initialValidationResult' => $initialValidationResult |
| 24 | 24 | ] ); |
| 25 | 25 | } |