|
3 | 3 | namespace Lifyzer\Api; |
4 | 4 |
|
5 | 5 | use PDO; |
6 | | -use stdClass; |
7 | 6 | use PHPMailer\PHPMailer\Exception; |
8 | | -use PHPMailer\PHPMailer\PHPMailer; |
| 7 | +use stdClass; |
9 | 8 |
|
10 | 9 | class User |
11 | 10 | { |
@@ -62,32 +61,32 @@ public function callService($service, $postData) |
62 | 61 | } |
63 | 62 | } |
64 | 63 |
|
65 | | - private function addLogs($userData) { |
| 64 | + private function addLogs($userData) |
| 65 | + { |
66 | 66 |
|
67 | 67 | $connection = $this->connection; |
68 | 68 |
|
69 | 69 | $user_id = validateObject($userData, 'user_id', ""); |
70 | 70 | $user_id = addslashes($user_id); |
71 | 71 |
|
72 | 72 | $api = validateObject($userData, 'api', ""); |
73 | | - $api = addslashes($api); |
| 73 | + $api = addslashes($api); |
74 | 74 |
|
75 | 75 | $response = validateObject($userData, 'response', ""); |
76 | | - $response = addslashes($response); |
| 76 | + $response = addslashes($response); |
77 | 77 |
|
78 | 78 | $user_array = [ |
79 | | - 'api' => $api, |
80 | | - 'response' => $response, |
81 | | - 'user_id' => $user_id |
82 | | - ]; |
| 79 | + 'api' => $api, |
| 80 | + 'response' => $response, |
| 81 | + 'user_id' => $user_id |
| 82 | + ]; |
83 | 83 |
|
84 | 84 | $user_response = addData($connection, 'Registration', TABLE_LOGS, $user_array); |
85 | 85 |
|
86 | | - if ($user_response[STATUS_KEY] === SUCCESS) { |
| 86 | + if ($user_response[STATUS_KEY] === SUCCESS) { |
87 | 87 | $status = SUCCESS; |
88 | 88 | $message = "successfully loged"; |
89 | | - } |
90 | | - else{ |
| 89 | + } else { |
91 | 90 | $status = FAILED; |
92 | 91 | $message = SOMETHING_WENT_WRONG_TRY_AGAIN_LATER; |
93 | 92 | } |
@@ -186,7 +185,7 @@ private function registration($userData) |
186 | 185 | ], |
187 | 186 | new Email() |
188 | 187 | ); |
189 | | - } catch (\PHPMailer\PHPMailer\Exception $e) { |
| 188 | + } catch (Exception $e) { |
190 | 189 | $status = FAILED; |
191 | 190 | $message = SOMETHING_WENT_WRONG_TRY_AGAIN_LATER; |
192 | 191 | } |
@@ -456,7 +455,7 @@ private function forgotPassword($userData) |
456 | 455 | * @param array $data |
457 | 456 | * @param Email $email |
458 | 457 | * |
459 | | - * @throws \PHPMailer\PHPMailer\Exception |
| 458 | + * @throws Exception |
460 | 459 | */ |
461 | 460 | private function sendWelcomeEmail(array $data, Email $email) |
462 | 461 | { |
@@ -489,7 +488,7 @@ private function sendWelcomeEmail(array $data, Email $email) |
489 | 488 | * @param array $data |
490 | 489 | * @param Email $email |
491 | 490 | * |
492 | | - * @throws \PHPMailer\PHPMailer\Exception |
| 491 | + * @throws Exception |
493 | 492 | */ |
494 | 493 | private function sendForgotPassword(array $data, Email $email) |
495 | 494 | { |
|
0 commit comments