mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-05-10 18:26:26 +02:00
fix codestyle
This commit is contained in:
parent
350dbb5b59
commit
adef27f862
37 changed files with 556 additions and 488 deletions
adapters
|
@ -23,7 +23,7 @@ namespace adapters;
|
|||
/**
|
||||
* Adapter constructor, called when instanciated by RaspiSMS.
|
||||
*
|
||||
* @param json string $datas : JSON string of the datas to configure interaction with the implemented service
|
||||
* @param json string $datas : JSON string of the datas to configure interaction with the implemented service
|
||||
*/
|
||||
public function __construct(string $datas);
|
||||
|
||||
|
@ -31,12 +31,12 @@ namespace adapters;
|
|||
* Classname of the adapter.
|
||||
*/
|
||||
public static function meta_classname(): string;
|
||||
|
||||
|
||||
/**
|
||||
* Uniq name of the adapter
|
||||
* It should be the classname of the adapter un snakecase
|
||||
* It should be the classname of the adapter un snakecase.
|
||||
*/
|
||||
public static function meta_uid() : string;
|
||||
public static function meta_uid(): string;
|
||||
|
||||
/**
|
||||
* Name of the adapter.
|
||||
|
@ -66,18 +66,17 @@ namespace adapters;
|
|||
* Does the implemented service support reading smss.
|
||||
*/
|
||||
public static function meta_support_read(): bool;
|
||||
|
||||
|
||||
/**
|
||||
* Does the implemented service support reception callback.
|
||||
*/
|
||||
public static function meta_support_reception(): bool;
|
||||
|
||||
|
||||
/**
|
||||
* Does the implemented service support status change callback.
|
||||
*/
|
||||
public static function meta_support_status_change(): bool;
|
||||
|
||||
|
||||
/**
|
||||
* Method called to send a SMS to a number.
|
||||
*
|
||||
|
@ -86,10 +85,10 @@ namespace adapters;
|
|||
* @param bool $flash : Is the SMS a Flash SMS
|
||||
*
|
||||
* @return array : [
|
||||
* bool 'error' => false if no error, true else
|
||||
* ?string 'error_message' => null if no error, else error message
|
||||
* ?string 'uid' => Uid of the sms created on success
|
||||
* ]
|
||||
* bool 'error' => false if no error, true else
|
||||
* ?string 'error_message' => null if no error, else error message
|
||||
* ?string 'uid' => Uid of the sms created on success
|
||||
* ]
|
||||
*/
|
||||
public function send(string $destination, string $text, bool $flash = false);
|
||||
|
||||
|
@ -97,18 +96,18 @@ namespace adapters;
|
|||
* Method called to read SMSs of the number.
|
||||
*
|
||||
* @return array : [
|
||||
* bool 'error' => false if no error, true else
|
||||
* ?string 'error_message' => null if no error, else error message
|
||||
* array 'smss' => Array of the sms reads
|
||||
* [
|
||||
* [
|
||||
* string 'at' => sms reception date,
|
||||
* string 'text' => sms text,
|
||||
* string 'origin' => phone number who sent the sms
|
||||
* ],
|
||||
* ...
|
||||
* ]
|
||||
* ]
|
||||
* bool 'error' => false if no error, true else
|
||||
* ?string 'error_message' => null if no error, else error message
|
||||
* array 'smss' => Array of the sms reads
|
||||
* [
|
||||
* [
|
||||
* string 'at' => sms reception date,
|
||||
* string 'text' => sms text,
|
||||
* string 'origin' => phone number who sent the sms
|
||||
* ],
|
||||
* ...
|
||||
* ]
|
||||
* ]
|
||||
*/
|
||||
public function read(): array;
|
||||
|
||||
|
@ -126,20 +125,20 @@ namespace adapters;
|
|||
* @return mixed : False on error, else array ['uid' => uid of the sms, 'status' => New status of the sms (\models\Sended::STATUS_UNKNOWN, \models\Sended::STATUS_DELIVERED, \models\Sended::STATUS_FAILED)]
|
||||
*/
|
||||
public static function status_change_callback();
|
||||
|
||||
|
||||
/**
|
||||
* Method called on reception of a sms notification.
|
||||
*
|
||||
* @return array : [
|
||||
* bool 'error' => false on success, true on error
|
||||
* ?string 'error_message' => null on success, error message else
|
||||
* array 'sms' => array [
|
||||
* string 'at' : Recepetion date format Y-m-d H:i:s,
|
||||
* string 'text' : SMS body,
|
||||
* string 'origin' : SMS sender,
|
||||
* ]
|
||||
* bool 'error' => false on success, true on error
|
||||
* ?string 'error_message' => null on success, error message else
|
||||
* array 'sms' => array [
|
||||
* string 'at' : Recepetion date format Y-m-d H:i:s,
|
||||
* string 'text' : SMS body,
|
||||
* string 'origin' : SMS sender,
|
||||
* ]
|
||||
*
|
||||
* ]
|
||||
*/
|
||||
public static function reception_callback() : array;
|
||||
public static function reception_callback(): array;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue