Passed
Push — master ( 7af25e...57d5f3 )
by Andrey
03:49
created
src/NovaPoshta.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,18 +106,18 @@
 block discarded – undo
106 106
 
107 107
         // ошибки либо уведомления
108 108
         if (isset($answer['warnings']) && isset($answer['warnings'])) {
109
-          $info = $answer['warnings'];
109
+            $info = $answer['warnings'];
110 110
 
111
-          if ($answer['errors']) {
111
+            if ($answer['errors']) {
112 112
             $info = $answer['errors'];
113 113
             if ($answer['errorCodes']) {
114
-              $info = [];
115
-              foreach ($answer['errorCodes'] as $key => $err) {
114
+                $info = [];
115
+                foreach ($answer['errorCodes'] as $key => $err) {
116 116
                 $info['StatusCode'] = $err;
117 117
                 $info['StatusLocale'] = __('novaposhta::novaposhta.statusCode.'.$err);
118
-              }
118
+                }
119
+            }
119 120
             }
120
-          }
121 121
         }
122 122
 
123 123
         if (! $info && isset($answer['info'])) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function getApi()
33 33
     {
34
-        if (! $this->api) {
34
+        if (!$this->api) {
35 35
             $this->api = config('novaposhta.api_key');
36 36
         }
37 37
 
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         $answer = $response->json();
92
-        if (! $auth && isset($answer[0])) {
92
+        if (!$auth && isset($answer[0])) {
93 93
             //костыль для НовойПочты. Спасибо Вам большое :)
94 94
             $answer = $answer[0];
95 95
         }
96 96
 
97
-        if (! isset($answer['success']) || ! isset($answer['data']) || empty($answer['data'])) {
97
+        if (!isset($answer['success']) || !isset($answer['data']) || empty($answer['data'])) {
98 98
             // что-то не так в ответе
99 99
             $info = trans('novaposhta::novaposhta.error_answer');
100 100
             $success = false;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
           }
121 121
         }
122 122
 
123
-        if (! $info && isset($answer['info'])) {
123
+        if (!$info && isset($answer['info'])) {
124 124
             $info = $answer['info'];
125 125
         }
126 126
 
Please login to merge, or discard this patch.