Completed
Pull Request — master (#80)
by
unknown
11:04 queued 05:59
created
src/Entity/InsuredValue.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     }
55 55
 
56 56
     /**
57
-     * @return string|null
57
+     * @return string
58 58
      */
59 59
     public function getCurrencyCode()
60 60
     {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     }
72 72
 
73 73
     /**
74
-     * @return float|null
74
+     * @return double
75 75
      */
76 76
     public function getMonetaryValue()
77 77
     {
Please login to merge, or discard this patch.
src/Entity/Tradeability/Shipment.php 1 patch
Doc Comments   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
     private $tariffCodeAlert;
72 72
 
73 73
     /**
74
-     * @param null|DOMDocument $document
74
+     * @param null|\DOMDocument $document
75 75
      *
76
-     * @return DOMElement
76
+     * @return \DOMElement
77 77
      */
78 78
     public function toNode(DOMDocument $document = null)
79 79
     {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
     /**
147 147
      * @param AdditionalInsurance $additionalInsurance
148
-     * @return QueryRequestShipment
148
+     * @return Shipment
149 149
      */
150 150
     public function setAdditionalInsurance($additionalInsurance)
151 151
     {
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
     /**
166 166
      * @param FreightCharges $freightCharges
167
-     * @return QueryRequestShipment
167
+     * @return Shipment
168 168
      */
169 169
     public function setFreightCharges($freightCharges)
170 170
     {
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
     /**
185 185
      * @param string $originCountryCode
186
-     * @return QueryRequestShipment
186
+     * @return Shipment
187 187
      */
188 188
     public function setOriginCountryCode($originCountryCode)
189 189
     {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
     /**
204 204
      * @param string $destinationCountryCode
205
-     * @return QueryRequestShipment
205
+     * @return Shipment
206 206
      */
207 207
     public function setDestinationCountryCode($destinationCountryCode)
208 208
     {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
     /**
223 223
      * @param string $originStateProvinceCode
224
-     * @return QueryRequestShipment
224
+     * @return Shipment
225 225
      */
226 226
     public function setOriginStateProvinceCode($originStateProvinceCode)
227 227
     {
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 
241 241
     /**
242 242
      * @param string $destinationStateProvinceCode
243
-     * @return QueryRequestShipment
243
+     * @return Shipment
244 244
      */
245 245
     public function setDestinationStateProvinceCode($destinationStateProvinceCode)
246 246
     {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
     /**
261 261
      * @param int $transportationMode
262
-     * @return QueryRequestShipment
262
+     * @return Shipment
263 263
      */
264 264
     public function setTransportationMode($transportationMode)
265 265
     {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 
279 279
     /**
280 280
      * @param string $resultCurrencyCode
281
-     * @return QueryRequestShipment
281
+     * @return Shipment
282 282
      */
283 283
     public function setResultCurrencyCode($resultCurrencyCode)
284 284
     {
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     }
308 308
 
309 309
     /**
310
-     * @return mixed
310
+     * @return string|null
311 311
      */
312 312
     public function getTransactionReferenceId()
313 313
     {
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 
317 317
     /**
318 318
      * @param mixed $transactionReferenceId
319
-     * @return QueryRequestShipment
319
+     * @return Shipment
320 320
      */
321 321
     public function setTransactionReferenceId($transactionReferenceId)
322 322
     {
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 
336 336
     /**
337 337
      * @param array $products
338
-     * @return QueryRequestShipment
338
+     * @return Shipment
339 339
      */
340 340
     public function setProducts($products)
341 341
     {
Please login to merge, or discard this patch.
src/Entity/Translate.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     }
98 98
 
99 99
     /**
100
-     * @return string|null
100
+     * @return string
101 101
      */
102 102
     public function getLanguageCode()
103 103
     {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     }
115 115
 
116 116
     /**
117
-     * @return string|null
117
+     * @return string
118 118
      */
119 119
     public function getDialectCode()
120 120
     {
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     }
132 132
 
133 133
     /**
134
-     * @return null|string
134
+     * @return string
135 135
      */
136 136
     public function getCode()
137 137
     {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     }
149 149
 
150 150
     /**
151
-     * @return null|string
151
+     * @return string
152 152
      */
153 153
     public function getLocale()
154 154
     {
Please login to merge, or discard this patch.
src/Locator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
      * Create the TimeInTransit request.
87 87
      *
88 88
      * @param LocatorRequest $locatorRequest The request details. Refer to the UPS documentation for available structure
89
-     * @param $requestOption
89
+     * @param integer $requestOption
90 90
      *
91 91
      * @return string
92 92
      */
Please login to merge, or discard this patch.
src/TimeInTransit.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @throws Exception
43 43
      *
44
-     * @return TimeInTransitRequest
44
+     * @return TimeInTransitResponse
45 45
      */
46 46
     public function getTimeInTransit(TimeInTransitRequest $shipment)
47 47
     {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      *
57 57
      * @throws Exception
58 58
      *
59
-     * @return TimeInTransitRequest
59
+     * @return TimeInTransitResponse
60 60
      */
61 61
     private function sendRequest(TimeInTransitRequest $timeInTransitRequest)
62 62
     {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      *
155 155
      * @param SimpleXMLElement $response
156 156
      *
157
-     * @return TimeInTransitRequest
157
+     * @return TimeInTransitResponse
158 158
      */
159 159
     private function formatResponse(SimpleXMLElement $response)
160 160
     {
Please login to merge, or discard this patch.
src/Tradeability.php 1 patch
Doc Comments   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,6 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Create the LandedCostRequest request.
85 85
      *
86
-     * @param LandedCostRequest $request The request details. Refer to the UPS documentation for available structure
87 86
      *
88 87
      * @return string
89 88
      */
@@ -112,14 +111,14 @@  discard block
 block discarded – undo
112 111
     /**
113 112
      * Creates and sends a request for the given data. Most errors are handled in SoapRequest
114 113
      *
115
-     * @param $request
116
-     * @param $endpoint
117
-     * @param $operation
118
-     * @param $wsdl
114
+     * @param string $request
115
+     * @param string $endpoint
116
+     * @param string $operation
117
+     * @param string $wsdl
119 118
      *
120 119
      * @throws Exception
121 120
      *
122
-     * @return TimeInTransitRequest
121
+     * @return \stdClass
123 122
      */
124 123
     private function sendRequest($request, $endpoint, $operation, $wsdl)
125 124
     {
@@ -165,7 +164,7 @@  discard block
 block discarded – undo
165 164
      *
166 165
      * @param SimpleXMLElement $response
167 166
      *
168
-     * @return stdClass
167
+     * @return \stdClass
169 168
      */
170 169
     private function formatResponse(SimpleXMLElement $response)
171 170
     {
Please login to merge, or discard this patch.
src/AddressValidation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
         }
129 129
         if ($this->useAVResponseObject) {
130 130
             unset($response->Response);
131
-            $avResponse = new AddressValidationResponse($response,$requestOption);
131
+            $avResponse = new AddressValidationResponse($response, $requestOption);
132 132
             return $avResponse;
133 133
         }
134 134
         return $this->formatResponse($response);
Please login to merge, or discard this patch.
src/Entity/AddressValidation/AVAddress.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,9 +64,9 @@
 block discarded – undo
64 64
      * @param string $extendedDivider
65 65
      * @return string
66 66
      */
67
-    public function getPostalCode($withExtended = false,$extendedDivider = '-')
67
+    public function getPostalCode($withExtended = false, $extendedDivider = '-')
68 68
     {
69
-        if($withExtended) {
69
+        if ($withExtended) {
70 70
             return $this->postcodePrimaryLow . $extendedDivider . $this->postcodeExtendedLow;
71 71
         }
72 72
         return $this->postcodePrimaryLow;
Please login to merge, or discard this patch.
src/Entity/AddressValidationResponse.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param \SimpleXMLElement $xmlDocument
16 16
      * @param $requestAction
17 17
      */
18
-    public function __construct(\SimpleXMLElement $xmlDocument,$requestAction)
18
+    public function __construct(\SimpleXMLElement $xmlDocument, $requestAction)
19 19
     {
20 20
         $this->response = $xmlDocument;
21 21
         $this->requestAction = $requestAction;
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function noCandidates()
32 32
     {
33
-        if(AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) {
34
-            throw new \BadMethodCallException(__METHOD__.' should not be called on Address Classification only requests.');
33
+        if (AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) {
34
+            throw new \BadMethodCallException(__METHOD__ . ' should not be called on Address Classification only requests.');
35 35
         }
36 36
         return isset($this->response->NoCandidatesIndicator);
37 37
     }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function isValid()
46 46
     {
47
-        if(AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) {
47
+        if (AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) {
48 48
             return $this->response->AddressClassification->Code > 0;
49 49
         }
50 50
         return isset($this->response->ValidAddressIndicator);
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function isAmbiguous()
62 62
     {
63
-        if(AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) {
64
-            throw new \BadMethodCallException(__METHOD__.' should not be called on Address Classification only requests.');
63
+        if (AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) {
64
+            throw new \BadMethodCallException(__METHOD__ . ' should not be called on Address Classification only requests.');
65 65
         }
66 66
         return isset($this->response->AmbiguousAddressIndicator);
67 67
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function getAddressClassification()
74 74
     {
75
-        if($this->requestAction < AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION) {
75
+        if ($this->requestAction < AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION) {
76 76
             throw new \BadMethodCallException('Address Classification was not requested.');
77 77
         }
78 78
         return new AddressClassification($this->response->AddressClassification);
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function getCandidateAddressList()
85 85
     {
86
-        if(!isset($this->response->AddressKeyFormat)) {
86
+        if (!isset($this->response->AddressKeyFormat)) {
87 87
             return [];
88 88
         }
89 89
         $candidates = [];
90
-        foreach($this->response->AddressKeyFormat as $address) {
90
+        foreach ($this->response->AddressKeyFormat as $address) {
91 91
             $candidates[] = new AVAddress($address);
92 92
         }
93 93
         return $candidates;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function getValidatedAddress()
97 97
     {
98
-        if($this->requestAction == AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION) {
98
+        if ($this->requestAction == AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION) {
99 99
             throw new \BadMethodCallException('Only Address Classification was requested. There is no address.');
100 100
         }
101 101
 
Please login to merge, or discard this patch.