mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-19 14:01:38 -04:00
Fixes
- PHP 8.2 deprecates dynamically declared class properties. Adding these declarations removes deprecation warnings and makes the code PHP 8.3 compatible. - Add Elvis operator to set search string to an empty string when it's value is null to get rid of an error in the search function call. - Imported class for OSPOS config - Replaced private with protected in parent controller's property. - Removed unneeded TODO - Refactored local variables - Replaced ternary notation - Removed unneeded comments - Removed unneeded class property - Removed unneeded @property declarations - Fixed database version
This commit is contained in:
@@ -4,6 +4,7 @@ namespace app\Libraries;
|
||||
|
||||
use CodeIgniter\Encryption\Encryption;
|
||||
use CodeIgniter\Encryption\EncrypterInterface;
|
||||
use Config\OSPOS;
|
||||
use Config\Services;
|
||||
|
||||
|
||||
@@ -11,18 +12,14 @@ use Config\Services;
|
||||
* SMS library
|
||||
*
|
||||
* Library with utilities to send texts via SMS Gateway (requires proxy implementation)
|
||||
*
|
||||
* @property encryption encryption
|
||||
* @property encrypterinterface encrypter
|
||||
*
|
||||
*/
|
||||
|
||||
class Sms_lib
|
||||
{
|
||||
/*
|
||||
/**
|
||||
* SMS sending function
|
||||
* Example of use: $response = sendSMS('4477777777', 'My test message');
|
||||
*/
|
||||
**/
|
||||
public function sendSMS(int $phone, string $message): bool
|
||||
{
|
||||
$config = config(OSPOS::class)->settings;
|
||||
|
||||
Reference in New Issue
Block a user