Passed
Branch master (d28d89)
by John
04:08
created
src/Authnetjson/AuthnetWebhooksRequest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -67,17 +67,17 @@
 block discarded – undo
67 67
      */
68 68
     public function __toString(): string
69 69
     {
70
-        $output = '<table id="authnet-request">' . "\n";
71
-        $output .= '<caption>Authorize.Net Request</caption>' . "\n";
72
-        $output .= '<tr><th colspan="2"><b>Class Parameters</b></th></tr>' . "\n";
73
-        $output .= '<tr><td><b>Authnet Server URL</b></td><td>' . $this->url . '</td></tr>' . "\n";
74
-        $output .= '<tr><th colspan="2"><b>Request JSON</b></th></tr>' . "\n";
70
+        $output = '<table id="authnet-request">'."\n";
71
+        $output .= '<caption>Authorize.Net Request</caption>'."\n";
72
+        $output .= '<tr><th colspan="2"><b>Class Parameters</b></th></tr>'."\n";
73
+        $output .= '<tr><td><b>Authnet Server URL</b></td><td>'.$this->url.'</td></tr>'."\n";
74
+        $output .= '<tr><th colspan="2"><b>Request JSON</b></th></tr>'."\n";
75 75
         if (!empty($this->requestJson)) {
76
-            $output .= '<tr><td colspan="2"><pre>' . "\n";
77
-            $output .= $this->requestJson . "\n";
78
-            $output .= '</pre></td></tr>' . "\n";
76
+            $output .= '<tr><td colspan="2"><pre>'."\n";
77
+            $output .= $this->requestJson."\n";
78
+            $output .= '</pre></td></tr>'."\n";
79 79
         } else {
80
-            $output .= '<tr><td colspan="2" style="text-align: center;"><pre>N/A</pre></td></tr>' . "\n";
80
+            $output .= '<tr><td colspan="2" style="text-align: center;"><pre>N/A</pre></td></tr>'."\n";
81 81
         }
82 82
         $output .= '</table>';
83 83
 
Please login to merge, or discard this patch.
src/Authnetjson/AuthnetWebhook.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -81,16 +81,16 @@
 block discarded – undo
81 81
      */
82 82
     public function __toString()
83 83
     {
84
-        $output = '<table id="authnet-webhook">' . "\n";
85
-        $output .= '<caption>Authorize.Net Webhook</caption>' . "\n";
86
-        $output .= '<tr><th colspan="2"><b>Response HTTP Headers</b></th></tr>' . "\n";
87
-        $output .= '<tr><td colspan="2"><pre>' . "\n";
88
-        $output .= var_export($this->headers) . "\n";
89
-        $output .= '</pre></td></tr>' . "\n";
90
-        $output .= '<tr><th colspan="2"><b>Response JSON</b></th></tr>' . "\n";
91
-        $output .= '<tr><td colspan="2"><pre>' . "\n";
92
-        $output .= $this->webhookJson . "\n";
93
-        $output .= '</pre></td></tr>' . "\n";
84
+        $output = '<table id="authnet-webhook">'."\n";
85
+        $output .= '<caption>Authorize.Net Webhook</caption>'."\n";
86
+        $output .= '<tr><th colspan="2"><b>Response HTTP Headers</b></th></tr>'."\n";
87
+        $output .= '<tr><td colspan="2"><pre>'."\n";
88
+        $output .= var_export($this->headers)."\n";
89
+        $output .= '</pre></td></tr>'."\n";
90
+        $output .= '<tr><th colspan="2"><b>Response JSON</b></th></tr>'."\n";
91
+        $output .= '<tr><td colspan="2"><pre>'."\n";
92
+        $output .= $this->webhookJson."\n";
93
+        $output .= '</pre></td></tr>'."\n";
94 94
         $output .= '</table>';
95 95
 
96 96
         return $output;
Please login to merge, or discard this patch.
src/Authnetjson/AuthnetWebhooksResponse.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,12 +58,12 @@
 block discarded – undo
58 58
      */
59 59
     public function __toString(): string
60 60
     {
61
-        $output = '<table id="authnet-response">' . "\n";
62
-        $output .= '<caption>Authorize.Net Webhook Response</caption>' . "\n";
63
-        $output .= '<tr><th colspan="2"><b>Webhook Response JSON</b></th></tr>' . "\n";
64
-        $output .= '<tr><td colspan="2"><pre>' . "\n";
65
-        $output .= $this->responseJson . "\n";
66
-        $output .= '</pre></td></tr>' . "\n";
61
+        $output = '<table id="authnet-response">'."\n";
62
+        $output .= '<caption>Authorize.Net Webhook Response</caption>'."\n";
63
+        $output .= '<tr><th colspan="2"><b>Webhook Response JSON</b></th></tr>'."\n";
64
+        $output .= '<tr><td colspan="2"><pre>'."\n";
65
+        $output .= $this->responseJson."\n";
66
+        $output .= '</pre></td></tr>'."\n";
67 67
         $output .= '</table>';
68 68
 
69 69
         return $output;
Please login to merge, or discard this patch.
src/Authnetjson/AuthnetJsonRequest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -126,17 +126,17 @@
 block discarded – undo
126 126
      */
127 127
     public function __toString()
128 128
     {
129
-        $output = '<table id="authnet-request">' . "\n";
130
-        $output .= '<caption>Authorize.Net Request</caption>' . "\n";
131
-        $output .= '<tr><th colspan="2"><b>Class Parameters</b></th></tr>' . "\n";
132
-        $output .= '<tr><td><b>API Login ID</b></td><td>' . $this->login . '</td></tr>' . "\n";
133
-        $output .= '<tr><td><b>Transaction Key</b></td><td>' . $this->transactionKey . '</td></tr>' . "\n";
134
-        $output .= '<tr><td><b>Authnet Server URL</b></td><td>' . $this->url . '</td></tr>' . "\n";
135
-        $output .= '<tr><th colspan="2"><b>Request JSON</b></th></tr>' . "\n";
129
+        $output = '<table id="authnet-request">'."\n";
130
+        $output .= '<caption>Authorize.Net Request</caption>'."\n";
131
+        $output .= '<tr><th colspan="2"><b>Class Parameters</b></th></tr>'."\n";
132
+        $output .= '<tr><td><b>API Login ID</b></td><td>'.$this->login.'</td></tr>'."\n";
133
+        $output .= '<tr><td><b>Transaction Key</b></td><td>'.$this->transactionKey.'</td></tr>'."\n";
134
+        $output .= '<tr><td><b>Authnet Server URL</b></td><td>'.$this->url.'</td></tr>'."\n";
135
+        $output .= '<tr><th colspan="2"><b>Request JSON</b></th></tr>'."\n";
136 136
         if (!empty($this->requestJson)) {
137
-            $output .= '<tr><td colspan="2"><pre>' . "\n";
138
-            $output .= $this->requestJson . "\n";
139
-            $output .= '</pre></td></tr>' . "\n";
137
+            $output .= '<tr><td colspan="2"><pre>'."\n";
138
+            $output .= $this->requestJson."\n";
139
+            $output .= '</pre></td></tr>'."\n";
140 140
         }
141 141
         $output .= '</table>';
142 142
 
Please login to merge, or discard this patch.
src/Authnetjson/AuthnetJsonResponse.php 1 patch
Spacing   +10 added lines, -12 removed lines patch added patch discarded remove patch
@@ -128,12 +128,10 @@  discard block
 block discarded – undo
128 128
         if ($this->directResponse ||
129 129
             $this->validationDirectResponseList ||
130 130
             isset($this->response->validationDirectResponse)) {
131
-            $response = $this->directResponse ?:
132
-                $this->validationDirectResponseList ?:
133
-                $this->response->validationDirectResponse;
131
+            $response = $this->directResponse ?: $this->validationDirectResponseList ?: $this->response->validationDirectResponse;
134 132
             if (is_array($response)) {
135 133
                 $this->transactionInfoArray = array_map(
136
-                    static function ($r) {
134
+                    static function($r) {
137 135
                         return new TransactionResponse($r);
138 136
                     },
139 137
                     $response
@@ -152,12 +150,12 @@  discard block
 block discarded – undo
152 150
      */
153 151
     public function __toString()
154 152
     {
155
-        $output = '<table id="authnet-response">' . "\n";
156
-        $output .= '<caption>Authorize.Net Response</caption>' . "\n";
157
-        $output .= '<tr><th colspan="2"><b>Response JSON</b></th></tr>' . "\n";
158
-        $output .= '<tr><td colspan="2"><pre>' . "\n";
159
-        $output .= $this->responseJson . "\n";
160
-        $output .= '</pre></td></tr>' . "\n";
153
+        $output = '<table id="authnet-response">'."\n";
154
+        $output .= '<caption>Authorize.Net Response</caption>'."\n";
155
+        $output .= '<tr><th colspan="2"><b>Response JSON</b></th></tr>'."\n";
156
+        $output .= '<tr><td colspan="2"><pre>'."\n";
157
+        $output .= $this->responseJson."\n";
158
+        $output .= '</pre></td></tr>'."\n";
161 159
         $output .= '</table>';
162 160
 
163 161
         return $output;
@@ -233,9 +231,9 @@  discard block
 block discarded – undo
233 231
     protected function checkTransactionStatus(int $status): bool
234 232
     {
235 233
         if ($this->transactionInfo instanceof TransactionResponse) {
236
-            $match = (int)$this->transactionInfo->getTransactionResponseField('ResponseCode') === $status;
234
+            $match = (int) $this->transactionInfo->getTransactionResponseField('ResponseCode') === $status;
237 235
         } else {
238
-            $match = (int)$this->transactionResponse->responseCode === $status;
236
+            $match = (int) $this->transactionResponse->responseCode === $status;
239 237
         }
240 238
         return $match;
241 239
     }
Please login to merge, or discard this patch.