@@ -16,12 +16,14 @@ |
||
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 |
@@ -20,8 +20,9 @@ |
||
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) { |