Completed
Pull Request — develop (#180)
by
unknown
02:48
created
src/Entity/AddressValidation/AVAddress.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,15 +62,15 @@  discard block
 block discarded – undo
62 62
     public function __construct(\SimpleXMLElement $xmlDoc)
63 63
     {
64 64
         if ($xmlDoc->count() == 0) {
65
-            throw new \InvalidArgumentException(__METHOD__ . ': The passed object does not have any child nodes.');
65
+            throw new \InvalidArgumentException(__METHOD__.': The passed object does not have any child nodes.');
66 66
         }
67 67
         $this->addressClassification = isset($xmlDoc->AddressClassification) ? new AddressClassification($xmlDoc->AddressClassification) : null;
68 68
         $this->consigneeName = isset($xmlDoc->ConsigneeName) ? (string)$xmlDoc->ConsigneeName : '';
69 69
         $this->buildingName = isset($xmlDoc->BuildingName) ? (string)$xmlDoc->BuildingName : '';
70 70
         if (isset($xmlDoc->AddressLine)) {
71 71
             for ($i = 0, $len = count($xmlDoc->AddressLine); $i < $len; $i++) {
72
-                $var = 'addressLine' . ($i > 0 ? $i + 1 : '');
73
-                $this->{$var} = isset($xmlDoc->AddressLine[$i]) ? (string) $xmlDoc->AddressLine[$i] : '';
72
+                $var = 'addressLine'.($i > 0 ? $i + 1 : '');
73
+                $this->{$var} = isset($xmlDoc->AddressLine[$i]) ? (string)$xmlDoc->AddressLine[$i] : '';
74 74
             }
75 75
         }
76 76
         $this->region = isset($xmlDoc->Region) ? (string)$xmlDoc->Region : '';
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function getPostalCodeWithExtension($divider = '-')
156 156
     {
157
-        return $this->postcodePrimaryLow . $divider . $this->postcodeExtendedLow;
157
+        return $this->postcodePrimaryLow.$divider.$this->postcodeExtendedLow;
158 158
     }
159 159
 
160 160
     /**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public function getAddressLine($lineNumber = 1)
167 167
     {
168
-        $var = 'addressLine' . ($lineNumber > 1 ? $lineNumber : '');
168
+        $var = 'addressLine'.($lineNumber > 1 ? $lineNumber : '');
169 169
         return $this->{$var};
170 170
     }
171 171
 }
Please login to merge, or discard this patch.
src/Entity/Product.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 
81 81
         $node = $document->createElement('Product');
82 82
         for ($i = 1; $i <= 3; $i++) {
83
-            $desc = $this->{'getDescription' . $i}();
83
+            $desc = $this->{'getDescription'.$i}();
84 84
             if ($desc !== null) {
85 85
                 $node->appendChild($document->createElement('Description', $desc));
86 86
             }
Please login to merge, or discard this patch.
src/Entity/AddressValidationResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function noCandidates()
32 32
     {
33 33
         if (AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) {
34
-            throw new \BadMethodCallException(__METHOD__ . ' should not be called on Address Classification only requests.');
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
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     public function isAmbiguous()
63 63
     {
64 64
         if (AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) {
65
-            throw new \BadMethodCallException(__METHOD__ . ' should not be called on Address Classification only requests.');
65
+            throw new \BadMethodCallException(__METHOD__.' should not be called on Address Classification only requests.');
66 66
         }
67 67
         return isset($this->response->AmbiguousAddressIndicator);
68 68
     }
Please login to merge, or discard this patch.
src/Entity/AddressKeyFormat.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,16 +60,16 @@
 block discarded – undo
60 60
         }
61 61
 
62 62
         for ($i = 1; $i <= 3; $i++) {
63
-            $line = $this->{'getAddressLine' . $i}();
63
+            $line = $this->{'getAddressLine'.$i}();
64 64
             if ($line) {
65
-                $node->appendChild($document->createElement('AddressLine' . ($i == 1 ? '' : $i), $line));
65
+                $node->appendChild($document->createElement('AddressLine'.($i == 1 ? '' : $i), $line));
66 66
             }
67 67
         }
68 68
 
69 69
         for ($i = 1; $i <= 3; $i++) {
70
-            $line = $this->{'getPoliticalDivision' . $i}();
70
+            $line = $this->{'getPoliticalDivision'.$i}();
71 71
             if ($line) {
72
-                $node->appendChild($document->createElement('PoliticalDivision' . $i, $line));
72
+                $node->appendChild($document->createElement('PoliticalDivision'.$i, $line));
73 73
             }
74 74
         }
75 75
 
Please login to merge, or discard this patch.
src/SoapRequest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         );
98 98
 
99 99
         // Initialize soap client
100
-        $client = new SoapClient(__DIR__ . '/WSDL/' . $wsdl . '.wsdl', $mode);
100
+        $client = new SoapClient(__DIR__.'/WSDL/'.$wsdl.'.wsdl', $mode);
101 101
 
102 102
         // Set endpoint URL + auth & request data
103 103
         $client->__setLocation($endpointurl);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             'endpointurl' => $this->getEndpointUrl(),
117 117
         ]);
118 118
 
119
-        $this->logger->debug('Request: ' . $this->getRequest(), [
119
+        $this->logger->debug('Request: '.$this->getRequest(), [
120 120
             'id' => $id,
121 121
             'endpointurl' => $this->getEndpointUrl(),
122 122
         ]);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 'endpointurl' => $this->getEndpointUrl(),
133 133
             ]);
134 134
 
135
-            $this->logger->debug('Response: ' . $body, [
135
+            $this->logger->debug('Response: '.$body, [
136 136
                 'id' => $id,
137 137
                 'endpointurl' => $this->getEndpointUrl(),
138 138
             ]);
@@ -155,14 +155,14 @@  discard block
 block discarded – undo
155 155
                     'endpointurl' => $this->getEndpointUrl(),
156 156
                 ]);
157 157
 
158
-                throw new InvalidResponseException('Failure: ' . (string)$errorMsg[0] . ' (' . (string)$errorCode[0] . ')');
158
+                throw new InvalidResponseException('Failure: '.(string)$errorMsg[0].' ('.(string)$errorCode[0].')');
159 159
             } else {
160 160
                 $this->logger->alert($e->getMessage(), [
161 161
                     'id' => $id,
162 162
                     'endpointurl' => $this->getEndpointUrl(),
163 163
                 ]);
164 164
 
165
-                throw new InvalidResponseException('Cannot parse error from UPS: ' . $e->getMessage(), $e->getCode(),
165
+                throw new InvalidResponseException('Cannot parse error from UPS: '.$e->getMessage(), $e->getCode(),
166 166
                     $e);
167 167
             }
168 168
         }
Please login to merge, or discard this patch.
src/Entity/OtherCharges.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     }
50 50
 
51 51
     /**
52
-     * @return mixed
52
+     * @return string
53 53
      */
54 54
     public function getMonetaryValue()
55 55
     {
Please login to merge, or discard this patch.
src/Request.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Psr\Log\LoggerInterface;
10 10
 use Psr\Log\NullLogger;
11 11
 use SimpleXMLElement;
12
-use Ups\Exception\InvalidResponseException;
13 12
 use Ups\Exception\RequestException;
14 13
 
15 14
 class Request implements RequestInterface, LoggerAwareInterface
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     }
146 146
 
147 147
     /**
148
-     * @param $access
148
+     * @param string $access
149 149
      *
150 150
      * @return $this
151 151
      */
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     }
166 166
 
167 167
     /**
168
-     * @param $request
168
+     * @param string $request
169 169
      *
170 170
      * @return $this
171 171
      */
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     }
186 186
 
187 187
     /**
188
-     * @param $endpointUrl
188
+     * @param string $endpointUrl
189 189
      *
190 190
      * @return $this
191 191
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             'endpointurl' => $this->getEndpointUrl(),
85 85
         ]);
86 86
 
87
-        $this->logger->debug('Request: ' . $this->getRequest(), [
87
+        $this->logger->debug('Request: '.$this->getRequest(), [
88 88
             'id' => $id,
89 89
             'endpointurl' => $this->getEndpointUrl(),
90 90
         ]);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             $response = $client->post(
96 96
                 $this->getEndpointUrl(),
97 97
                 [
98
-                    'body' => $this->getAccess() . $this->getRequest(),
98
+                    'body' => $this->getAccess().$this->getRequest(),
99 99
                     'headers' => [
100 100
                         'Content-type' => 'application/x-www-form-urlencoded; charset=utf-8',
101 101
                         'Accept-Charset' => 'UTF-8',
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 'endpointurl' => $this->getEndpointUrl(),
112 112
             ]);
113 113
 
114
-            $this->logger->debug('Response: ' . $body, [
114
+            $this->logger->debug('Response: '.$body, [
115 115
                 'id' => $id,
116 116
                 'endpointurl' => $this->getEndpointUrl(),
117 117
             ]);
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 'endpointurl' => $this->getEndpointUrl(),
141 141
             ]);
142 142
 
143
-            throw new RequestException('Failure: ' . $e->getMessage());
143
+            throw new RequestException('Failure: '.$e->getMessage());
144 144
         }
145 145
     }
146 146
 
Please login to merge, or discard this patch.