Passed
Push — master ( 5a2b08...e5a819 )
by Hossein
01:48
created
src/SmartApi.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,12 +16,14 @@
 block discarded – undo
16 16
         $appName = $apiData['app_name'];
17 17
         $apiMethodsRepositoryClassPath = config("simotel.smartApi.methodsRepositoryClass");
18 18
         $apiMethodsRepository = new $apiMethodsRepositoryClassPath;
19
-        if (!method_exists($apiMethodsRepository, $appName))
20
-            return false;
19
+        if (!method_exists($apiMethodsRepository, $appName)) {
20
+                    return false;
21
+        }
21 22
 
22 23
         $apiResponse = $apiMethodsRepository->$appName($apiData);
23
-        if (!is_array($apiResponse))
24
-            return false;
24
+        if (!is_array($apiResponse)) {
25
+                    return false;
26
+        }
25 27
 
26 28
         return $apiResponse;
27 29
 
Please login to merge, or discard this patch.
src/SimotelApi.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
             $response = Http::withBasicAuth($user, $pass)->post($endpoint);
21 21
             $res = $response->json();
22 22
             $this->message = $res["message"];
23
-            if ($res["ok"] == 1)
24
-                return true;
23
+            if ($res["ok"] == 1) {
24
+                            return true;
25
+            }
25 26
             return false;
26 27
 
27 28
         } catch (\Exception $e) {
Please login to merge, or discard this patch.