Passed
Branch master (5699ff)
by Odiseo
08:41
created
Category
src/Calculator/UpsCalculator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $rateValue = $this->getUpsRateValue($configuration[$channelCode], $packageValues);
89 89
         }
90 90
 
91
-        return intval($rateValue*100);
91
+        return intval($rateValue * 100);
92 92
     }
93 93
 
94 94
     /**
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
             $weight += $item->getQuantity() * $variant->getWeight();
114 114
         }
115 115
 
116
-        $pounds = $weight*2.20462;
117
-        $ounces = $weight*35.274;
116
+        $pounds = $weight * 2.20462;
117
+        $ounces = $weight * 35.274;
118 118
 
119 119
         return array('width' => $width, 'height' => $height, 'length' => $length, 'weight' => $weight, 'pounds' => $pounds, 'ounces' => $ounces);
120 120
     }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     private function getServiceCode(string $origin, string $destination)
128 128
     {
129 129
         $serviceCode = '01';
130
-        if ($origin =='PR') {
130
+        if ($origin == 'PR') {
131 131
             if ($destination == 'PR') {
132 132
                 $serviceCode = '01'; // Next Day Air
133 133
             } elseif ($destination == 'US') {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             } else {
136 136
                 $serviceCode = '65'; // Ups Saver
137 137
             }
138
-        } elseif ($origin =='DR') {
138
+        } elseif ($origin == 'DR') {
139 139
             $serviceCode = '65'; // Ups Saver
140 140
         }
141 141
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $shipToAddress->setPostalCode($packageValues['destination_postcode']);
193 193
         $shipToAddress->setResidentialAddressIndicator($packageValues['destination_address']);
194 194
 
195
-        $pounds = $packageValues['weight'] *2.20462;
195
+        $pounds = $packageValues['weight'] * 2.20462;
196 196
 
197 197
         $package = new Package();
198 198
         $package->getPackagingType()->setCode($packageValues['type']);
Please login to merge, or discard this patch.
src/Form/Type/Calculator/ChannelBasedUpsConfigurationType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $resolver->setDefaults([
20 20
             'entry_type' => UpsConfigurationType::class,
21
-            'entry_options' => function (ChannelInterface $channel): array {
21
+            'entry_options' => function(ChannelInterface $channel): array {
22 22
                 return [
23 23
                     'label' => $channel->getName(),
24 24
                 ];
Please login to merge, or discard this patch.