- 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:
objecttothis
2023-12-01 17:34:16 +04:00
committed by jekkos
parent 70ee1ed36e
commit 48c04417b8
50 changed files with 527 additions and 674 deletions

View File

@@ -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;