Skip to content

Commit

Permalink
Create Logger Driver
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 authored Jan 28, 2025
1 parent 69329c8 commit 3a007b9
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/Drivers/Logger.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace Laraflow\Sms\Drivers;

use Laraflow\Sms\Contracts\SmsDriver;
use Laraflow\Sms\SmsMessage;

class Logger extends SmsDriver
{
/**
* this function allow programmer to append more config
* that may or may be needed in the configuration file
*
* @return string[]
*/
protected function mergeConfig(): array
{
return [];
}


/**
* Return validation rules for
* that sms driver to operate.
*/
public function rules(): array
{
return [];
}

/**
* Execute the sms sending request to api provider
*
* @param SmsMessage $message
* @return Response
*/
public function send(SmsMessage $message): Response

Check failure on line 37 in src/Drivers/Logger.php

View workflow job for this annotation

GitHub Actions / P8.2 - L10.* - prefer-stable - ubuntu-latest

Could not check compatibility between Laraflow\Sms\Drivers\Logger::send(Laraflow\Sms\SmsMessage $message): Laraflow\Sms\Drivers\Response and Laraflow\Sms\Contracts\SmsDriver::send(Laraflow\Sms\SmsMessage $message): Illuminate\Http\Client\Response, because class Laraflow\Sms\Drivers\Response is not available

Check failure on line 37 in src/Drivers/Logger.php

View workflow job for this annotation

GitHub Actions / phpstan

Method Laraflow\Sms\Drivers\Logger::send() has invalid return type Laraflow\Sms\Drivers\Response.

Check failure on line 37 in src/Drivers/Logger.php

View workflow job for this annotation

GitHub Actions / phpstan

Method Laraflow\Sms\Drivers\Logger::send() has invalid return type Laraflow\Sms\Drivers\Response.

Check failure on line 37 in src/Drivers/Logger.php

View workflow job for this annotation

GitHub Actions / phpstan

Return type Laraflow\Sms\Drivers\Response of method Laraflow\Sms\Drivers\Logger::send() is not covariant with return type Illuminate\Http\Client\Response of method Laraflow\Sms\Contracts\SmsDriver::send().
{
return [];

Check failure on line 39 in src/Drivers/Logger.php

View workflow job for this annotation

GitHub Actions / phpstan

Method Laraflow\Sms\Drivers\Logger::send() should return Laraflow\Sms\Drivers\Response but returns array.

}
}

0 comments on commit 3a007b9

Please sign in to comment.