| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | /** | 
| 45 | 45 | * @throws \Google\Exception | 
| 46 | 46 | */ | 
| 47 | -    private function getGoogleAccessToken(){ | |
| 47 | +    private function getGoogleAccessToken() { | |
| 48 | 48 | $options = $this->getOptions(); | 
| 49 | 49 | $credentialsFilePath = $options['credentialsFile']; | 
| 50 | 50 | $client = new \Google_Client(); | 
| @@ -66,10 +66,10 @@ discard block | ||
| 66 | 66 | * @throws Tiqr_Message_Exception_SendFailure | 
| 67 | 67 | * @throws \Google\Exception | 
| 68 | 68 | */ | 
| 69 | - private function _sendFirebase($deviceToken, $alert, $challenge, $apiKey, $retry=false) | |
| 69 | + private function _sendFirebase($deviceToken, $alert, $challenge, $apiKey, $retry = false) | |
| 70 | 70 |      { | 
| 71 | 71 | $options = $this->getOptions(); | 
| 72 | - $apiurl = 'https://fcm.googleapis.com/v1/projects/'.$options['fcm.projectId'].'/messages:send'; //replace "your-project-id" with...your project ID | |
| 72 | + $apiurl = 'https://fcm.googleapis.com/v1/projects/'.$options['fcm.projectId'].'/messages:send'; //replace "your-project-id" with...your project ID | |
| 73 | 73 | |
| 74 | 74 | $fields = [ | 
| 75 | 75 | 'message' => [ | 
| @@ -85,7 +85,7 @@ discard block | ||
| 85 | 85 | ]; | 
| 86 | 86 | |
| 87 | 87 | $headers = array( | 
| 88 | - 'Authorization: Bearer ' . $this->getGoogleAccessToken(), | |
| 88 | + 'Authorization: Bearer '.$this->getGoogleAccessToken(), | |
| 89 | 89 | 'Content-Type: application/json', | 
| 90 | 90 | ); | 
| 91 | 91 | |
| @@ -98,7 +98,7 @@ discard block | ||
| 98 | 98 | $result = curl_exec($ch); | 
| 99 | 99 | $errors = curl_error($ch); | 
| 100 | 100 | $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); | 
| 101 | - $remoteip = curl_getinfo($ch,CURLINFO_PRIMARY_IP); | |
| 101 | + $remoteip = curl_getinfo($ch, CURLINFO_PRIMARY_IP); | |
| 102 | 102 | curl_close($ch); | 
| 103 | 103 | |
| 104 | 104 |          if ($result === false) { | 
| @@ -106,7 +106,7 @@ discard block | ||
| 106 | 106 | } | 
| 107 | 107 | |
| 108 | 108 |          if (!empty($errors)) { | 
| 109 | -            throw new Tiqr_Message_Exception_SendFailure("Http error occurred: ". $errors, true); | |
| 109 | +            throw new Tiqr_Message_Exception_SendFailure("Http error occurred: ".$errors, true); | |
| 110 | 110 | } | 
| 111 | 111 | |
| 112 | 112 | // Wait and retry once in case of a 502 Bad Gateway error | 
| @@ -124,7 +124,7 @@ discard block | ||
| 124 | 124 | $response = json_decode($result, true); | 
| 125 | 125 |          foreach ($response['results'] as $k => $v) { | 
| 126 | 126 |              if (isset($v['error'])) { | 
| 127 | -                throw new Tiqr_Message_Exception_SendFailure("Error in FCM response: " . $v['error'], true); | |
| 127 | +                throw new Tiqr_Message_Exception_SendFailure("Error in FCM response: ".$v['error'], true); | |
| 128 | 128 | } | 
| 129 | 129 | } | 
| 130 | 130 | } |