@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | $this->session = $session; |
| 38 | 38 | $this->config = $config; |
| 39 | 39 | |
| 40 | - if($request) $this->host = $request->getHost(); |
|
| 40 | + if ($request) $this->host = $request->getHost(); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | public static function getSubscribedEvents() |
| 44 | 44 | { |
| 45 | - return [ 'twilio.auth.triggered' => 'onTwilioAuthTriggered' ]; |
|
| 45 | + return ['twilio.auth.triggered' => 'onTwilioAuthTriggered']; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function onTwilioAuthTriggered(GenericEvent $event) |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | $this->session->set('twilio_code', (string) $code); |
| 58 | 58 | |
| 59 | - if($user->getTwilioPreferredMethod() == 'sms') |
|
| 59 | + if ($user->getTwilioPreferredMethod() == 'sms') |
|
| 60 | 60 | { |
| 61 | 61 | $this->client->messages->create( |
| 62 | 62 | $user->getTwilioPhoneNumber(), [ |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | else |
| 69 | 69 | { |
| 70 | - if ( ! $this->config['voice_message_url'] && $this->host) |
|
| 70 | + if (!$this->config['voice_message_url'] && $this->host) |
|
| 71 | 71 | { |
| 72 | 72 | $this->config['voice_message_url'] = sprintf('http://%s/voice-ctrl?code={code}', $this->host); |
| 73 | 73 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $this->client->account->calls->create( |
| 76 | 76 | $user->getTwilioPhoneNumber(), |
| 77 | 77 | $this->config['voice_from'], |
| 78 | - [ 'url' => preg_replace('/{code}/', $code, $this->config['voice_message_url']) ] |
|
| 78 | + ['url' => preg_replace('/{code}/', $code, $this->config['voice_message_url'])] |
|
| 79 | 79 | ); |
| 80 | 80 | } |
| 81 | 81 | } |