@@ -19,24 +19,24 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * Flat rate per shipment calculator. |
| 21 | 21 | */ |
| 22 | - const FLAT_RATE = 'flat_rate'; |
|
| 22 | + const FLAT_RATE = 'flat_rate'; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Fixed price per item calculator. |
| 26 | 26 | */ |
| 27 | - const PER_ITEM_RATE = 'per_item_rate'; |
|
| 27 | + const PER_ITEM_RATE = 'per_item_rate'; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * Flexible rate calculator. |
| 31 | 31 | * Fixed price for first item and constant rate |
| 32 | 32 | * for each additional item with a limit. |
| 33 | 33 | */ |
| 34 | - const FLEXIBLE_RATE = 'flexible_rate'; |
|
| 34 | + const FLEXIBLE_RATE = 'flexible_rate'; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Fixed price per weight calculator. |
| 38 | 38 | */ |
| 39 | - const WEIGHT_RATE = 'weight_rate'; |
|
| 39 | + const WEIGHT_RATE = 'weight_rate'; |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * Flexible prices for weight ranges. |
@@ -368,7 +368,7 @@ |
||
| 368 | 368 | */ |
| 369 | 369 | public function getMainTaxon() |
| 370 | 370 | { |
| 371 | - return $this->mainTaxon; |
|
| 371 | + return $this->mainTaxon; |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | /** |
@@ -151,7 +151,7 @@ |
||
| 151 | 151 | public function getTaxons($taxonomy = null) |
| 152 | 152 | { |
| 153 | 153 | if (null !== $taxonomy) { |
| 154 | - return $this->taxons->filter(function (BaseTaxonInterface $taxon) use ($taxonomy) { |
|
| 154 | + return $this->taxons->filter(function(BaseTaxonInterface $taxon) use ($taxonomy) { |
|
| 155 | 155 | return $taxonomy === strtolower($taxon->getTaxonomy()->getName()); |
| 156 | 156 | }); |
| 157 | 157 | } |
@@ -138,10 +138,10 @@ discard block |
||
| 138 | 138 | $string .= '('; |
| 139 | 139 | |
| 140 | 140 | foreach ($this->getOptions() as $option) { |
| 141 | - $string .= $option->getOption()->getName() . ': ' . $option->getValue() . ', '; |
|
| 141 | + $string .= $option->getOption()->getName().': '.$option->getValue().', '; |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - $string = substr($string, 0, -2) . ')'; |
|
| 144 | + $string = substr($string, 0, -2).')'; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | return $string; |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | public function setSold($sold) |
| 304 | 304 | { |
| 305 | - $this->sold = (int)$sold; |
|
| 305 | + $this->sold = (int) $sold; |
|
| 306 | 306 | |
| 307 | 307 | return $this; |
| 308 | 308 | } |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | */ |
| 329 | 329 | public function setAvailableOnDemand($availableOnDemand) |
| 330 | 330 | { |
| 331 | - $this->availableOnDemand = (bool)$availableOnDemand; |
|
| 331 | + $this->availableOnDemand = (bool) $availableOnDemand; |
|
| 332 | 332 | |
| 333 | 333 | return $this; |
| 334 | 334 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | $adjustment = $this->createAdjustment($promotion); |
| 37 | 37 | $adjustmentAmount = (int) round($subject->getAdjustmentsTotal(AdjustmentInterface::SHIPPING_ADJUSTMENT) * $configuration['percentage']); |
| 38 | - $adjustment->setAmount(- $adjustmentAmount); |
|
| 38 | + $adjustment->setAmount(-$adjustmentAmount); |
|
| 39 | 39 | |
| 40 | 40 | $subject->addAdjustment($adjustment); |
| 41 | 41 | } |
@@ -17,7 +17,6 @@ |
||
| 17 | 17 | use Sylius\Component\Core\Model\CustomerInterface; |
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | - |
|
| 21 | 20 | * @author Alexandre Bacco <[email protected]> |
| 22 | 21 | */ |
| 23 | 22 | class CustomerSpec extends ObjectBehavior |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | |
| 164 | 164 | function it_has_no_main_taxon_by_default() |
| 165 | 165 | { |
| 166 | - $this->getMainTaxon()->shouldReturn(null); |
|
| 166 | + $this->getMainTaxon()->shouldReturn(null); |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | function it_sets_main_taxon(TaxonInterface $taxon) |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | */ |
| 81 | 81 | public function getCode() |
| 82 | 82 | { |
| 83 | - return $this->code; |
|
| 83 | + return $this->code; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | */ |
| 127 | 127 | public function setEnabled($enabled) |
| 128 | 128 | { |
| 129 | - $this->enabled = (Boolean)$enabled; |
|
| 129 | + $this->enabled = (Boolean) $enabled; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
@@ -48,8 +48,8 @@ |
||
| 48 | 48 | |
| 49 | 49 | function its_payment_method_is_mutable(PaymentMethodInterface $method) |
| 50 | 50 | { |
| 51 | - $this->setMethod($method); |
|
| 52 | - $this->getMethod()->shouldReturn($method); |
|
| 51 | + $this->setMethod($method); |
|
| 52 | + $this->getMethod()->shouldReturn($method); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | function it_has_no_source_by_default() |