@@ -23,11 +23,11 @@ discard block |
||
| 23 | 23 | $this->validate($message); |
| 24 | 24 | $manager = app()->make('tzsk-sms'); |
| 25 | 25 | |
| 26 | - if (! empty($message->getDriver())) { |
|
| 26 | + if (!empty($message->getDriver())) { |
|
| 27 | 27 | $manager->via($message->getDriver()); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - return $manager->send($message->getBody(), function ($sms) use ($message) { |
|
| 30 | + return $manager->send($message->getBody(), function($sms) use ($message) { |
|
| 31 | 31 | $sms->to($message->getRecipients()); |
| 32 | 32 | }); |
| 33 | 33 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | private function validate($message) |
| 42 | 42 | { |
| 43 | 43 | $conditions = [ |
| 44 | - 'Invalid data for sms notification.' => ! is_a($message, SmsBuilder::class), |
|
| 44 | + 'Invalid data for sms notification.' => !is_a($message, SmsBuilder::class), |
|
| 45 | 45 | 'Message body could not be empty.' => empty($message->getBody()), |
| 46 | 46 | 'Message recipient could not be empty.' => empty($message->getRecipients()), |
| 47 | 47 | ]; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $this->builder->send($message); |
| 91 | - if (! $callback) { |
|
| 91 | + if (!$callback) { |
|
| 92 | 92 | return $this; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -149,8 +149,8 @@ discard block |
||
| 149 | 149 | $conditions = [ |
| 150 | 150 | 'Driver not selected or default driver does not exist.' => empty($this->driver), |
| 151 | 151 | 'Driver not found in config file. Try updating the package.' => empty($this->config['drivers'][$this->driver]) || empty($this->config['map'][$this->driver]), |
| 152 | - 'Driver source not found. Please update the package.' => ! class_exists($this->config['map'][$this->driver]), |
|
| 153 | - 'Driver must be an instance of Contracts\DriverInterface.' => ! (new ReflectionClass($this->config['map'][$this->driver]))->implementsInterface(Contracts\DriverInterface::class), |
|
| 152 | + 'Driver source not found. Please update the package.' => !class_exists($this->config['map'][$this->driver]), |
|
| 153 | + 'Driver must be an instance of Contracts\DriverInterface.' => !(new ReflectionClass($this->config['map'][$this->driver]))->implementsInterface(Contracts\DriverInterface::class), |
|
| 154 | 154 | ]; |
| 155 | 155 | |
| 156 | 156 | foreach ($conditions as $ex => $condition) { |