@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | public function up(): void |
| 17 | 17 | { |
| 18 | - Schema::create(SmsReport::TABLE, function (Blueprint $table) { |
|
| 18 | + Schema::create(SmsReport::TABLE, function(Blueprint $table) { |
|
| 19 | 19 | $table->integerIncrements('id'); |
| 20 | 20 | $table->string('mobile')->nullable(); |
| 21 | 21 | $table->string('message', 510)->nullable(); |
@@ -40,13 +40,13 @@ |
||
| 40 | 40 | $this->app->singleton('sms', SmsManager::class); |
| 41 | 41 | $this->app->singleton('voiceCall', VoiceCallManager::class); |
| 42 | 42 | |
| 43 | - $this->app->bind(FakeSmsSender::class, function () { |
|
| 43 | + $this->app->bind(FakeSmsSender::class, function() { |
|
| 44 | 44 | $config = config('sms.drivers.fake') ?? []; |
| 45 | 45 | |
| 46 | 46 | return new FakeSmsSender($config); |
| 47 | 47 | }); |
| 48 | 48 | |
| 49 | - $this->app->bind(Kavenegar::class, function () { |
|
| 49 | + $this->app->bind(Kavenegar::class, function() { |
|
| 50 | 50 | $config = config('sms.drivers.kavenegar') ?? []; |
| 51 | 51 | $kavenegarApi = new KavenegarApi($config['apiKey']); |
| 52 | 52 | |
@@ -14,6 +14,6 @@ |
||
| 14 | 14 | use Illuminate\Support\Facades\Route; |
| 15 | 15 | use HoomanMirghasemi\Sms\Http\Controllers\SmsController; |
| 16 | 16 | |
| 17 | -Route::prefix('laravel/sms')->group(function () { |
|
| 17 | +Route::prefix('laravel/sms')->group(function() { |
|
| 18 | 18 | Route::get('get-sms-list', [SmsController::class, 'getList'])->name('sms.getList'); |
| 19 | 19 | }); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function send($notifiable, Notification $notification): void |
| 22 | 22 | { |
| 23 | 23 | $manager = $notification->toVoiceCall($notifiable); |
| 24 | - if (! is_null($manager)) { |
|
| 24 | + if (!is_null($manager)) { |
|
| 25 | 25 | $this->validate($manager); |
| 26 | 26 | $manager->send(); |
| 27 | 27 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | protected function validate($manager): void |
| 38 | 38 | { |
| 39 | - if (! $manager instanceof VoiceCallManager && ! $manager instanceof Driver) { |
|
| 39 | + if (!$manager instanceof VoiceCallManager && !$manager instanceof Driver) { |
|
| 40 | 40 | throw new Exception('Invalid data for voice call notification.'); |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | public function send($notifiable, Notification $notification): void |
| 22 | 22 | { |
| 23 | 23 | $manager = $notification->toSms($notifiable); |
| 24 | - if (! is_null($manager)) { |
|
| 24 | + if (!is_null($manager)) { |
|
| 25 | 25 | $this->validate($manager); |
| 26 | 26 | $manager->send(); |
| 27 | 27 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | protected function validate($manager): void |
| 38 | 38 | { |
| 39 | - if (! $manager instanceof SmsManager && ! $manager instanceof Driver) { |
|
| 39 | + if (!$manager instanceof SmsManager && !$manager instanceof Driver) { |
|
| 40 | 40 | throw new Exception('Invalid data for sms notification.'); |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | */ |
| 64 | 64 | public function usesTemplate(): bool |
| 65 | 65 | { |
| 66 | - return ! is_null($this->template['identifier']); |
|
| 66 | + return !is_null($this->template['identifier']); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function send(): bool |
| 30 | 30 | { |
| 31 | - if (! $this->serviceActive) { |
|
| 31 | + if (!$this->serviceActive) { |
|
| 32 | 32 | parent::failedConnectToProvider(); |
| 33 | 33 | |
| 34 | 34 | return false; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function getBalance(): string |
| 55 | 55 | { |
| 56 | - if (! $this->serviceActive) { |
|
| 56 | + if (!$this->serviceActive) { |
|
| 57 | 57 | return 'وب سرویس مگفا با مشکل مواجه شده.'; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | 'login' => data_get($this->settings, 'username').'/'.data_get($this->settings, 'domain'), |
| 79 | 79 | 'password' => data_get($this->settings, 'password'), |
| 80 | 80 | 'cache_wsdl' => WSDL_CACHE_NONE, // -No WSDL Cache |
| 81 | - 'compression' => (SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | 5), // -Compression * |
|
| 81 | + 'compression' => (SOAP_COMPRESSION_ACCEPT|SOAP_COMPRESSION_GZIP|5), // -Compression * |
|
| 82 | 82 | 'trace' => App::environment(['local', 'staging', 'testing']), // -Optional (debug) |
| 83 | 83 | ]); |
| 84 | 84 | } catch (SoapFault $soapFault) { |
@@ -35,14 +35,14 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function send(): bool |
| 37 | 37 | { |
| 38 | - if (! $this->serviceActive) { |
|
| 38 | + if (!$this->serviceActive) { |
|
| 39 | 39 | parent::failedConnectToProvider(); |
| 40 | 40 | |
| 41 | 41 | return false; |
| 42 | 42 | } |
| 43 | 43 | $this->params['text'] = $this->getMessage(); |
| 44 | 44 | $this->params['number'] = $this->recipient; |
| 45 | - if (! str_starts_with($this->params['number'], '+98')) { |
|
| 45 | + if (!str_starts_with($this->params['number'], '+98')) { |
|
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | // for sending to avanak change number format |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function getBalance(): string |
| 74 | 74 | { |
| 75 | - if (! $this->serviceActive) { |
|
| 75 | + if (!$this->serviceActive) { |
|
| 76 | 76 | return 'وب سرویس آوانک با مشکل مواجه شده.'; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function send(): bool |
| 29 | 29 | { |
| 30 | - if (! self::$successSend) { |
|
| 30 | + if (!self::$successSend) { |
|
| 31 | 31 | $this->webserviceResponse = 'An error happened !'; |
| 32 | 32 | $this->success = false; |
| 33 | 33 | } else { |