Passed
Push — master ( d28d89...804fca )
by John
05:13
created
src/Authnetjson/AuthnetJsonResponse.php 1 patch
Spacing   +10 added lines, -12 removed lines patch added patch discarded remove patch
@@ -129,12 +129,10 @@  discard block
 block discarded – undo
129 129
             || $this->validationDirectResponseList
130 130
             || isset($this->response->validationDirectResponse)
131 131
         ) {
132
-            $response = $this->directResponse ?:
133
-                $this->validationDirectResponseList ?:
134
-                $this->response->validationDirectResponse;
132
+            $response = $this->directResponse ?: $this->validationDirectResponseList ?: $this->response->validationDirectResponse;
135 133
             if (is_array($response)) {
136 134
                 $this->transactionInfoArray = array_map(
137
-                    static function ($r) {
135
+                    static function($r) {
138 136
                         return new TransactionResponse($r);
139 137
                     },
140 138
                     $response
@@ -153,12 +151,12 @@  discard block
 block discarded – undo
153 151
      */
154 152
     public function __toString()
155 153
     {
156
-        $output = '<table id="authnet-response">' . "\n";
157
-        $output .= '<caption>Authorize.Net Response</caption>' . "\n";
158
-        $output .= '<tr><th colspan="2"><b>Response JSON</b></th></tr>' . "\n";
159
-        $output .= '<tr><td colspan="2"><pre>' . "\n";
160
-        $output .= $this->responseJson . "\n";
161
-        $output .= '</pre></td></tr>' . "\n";
154
+        $output = '<table id="authnet-response">'."\n";
155
+        $output .= '<caption>Authorize.Net Response</caption>'."\n";
156
+        $output .= '<tr><th colspan="2"><b>Response JSON</b></th></tr>'."\n";
157
+        $output .= '<tr><td colspan="2"><pre>'."\n";
158
+        $output .= $this->responseJson."\n";
159
+        $output .= '</pre></td></tr>'."\n";
162 160
         $output .= '</table>';
163 161
 
164 162
         return $output;
@@ -234,9 +232,9 @@  discard block
 block discarded – undo
234 232
     protected function checkTransactionStatus(int $status): bool
235 233
     {
236 234
         if ($this->transactionInfo instanceof TransactionResponse) {
237
-            $match = (int)$this->transactionInfo->getTransactionResponseField('ResponseCode') === $status;
235
+            $match = (int) $this->transactionInfo->getTransactionResponseField('ResponseCode') === $status;
238 236
         } else {
239
-            $match = (int)$this->transactionResponse->responseCode === $status;
237
+            $match = (int) $this->transactionResponse->responseCode === $status;
240 238
         }
241 239
         return $match;
242 240
     }
Please login to merge, or discard this patch.