mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 00:08:16 -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:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Config;
|
||||
|
||||
use App\Models\Appconfig;
|
||||
use CodeIgniter\Cache\CacheInterface;
|
||||
use CodeIgniter\Config\BaseConfig;
|
||||
|
||||
@@ -13,9 +14,7 @@ use CodeIgniter\Config\BaseConfig;
|
||||
class OSPOS extends BaseConfig
|
||||
{
|
||||
public array $settings;
|
||||
|
||||
public string $commit_sha1 = 'dev'; //TODO: Travis scripts need to be updated to replace this with the commit hash on build
|
||||
|
||||
private CacheInterface $cache;
|
||||
|
||||
public function __construct()
|
||||
@@ -37,7 +36,7 @@ class OSPOS extends BaseConfig
|
||||
}
|
||||
else
|
||||
{
|
||||
$appconfig = model('Appconfig');
|
||||
$appconfig = model(Appconfig::class);
|
||||
foreach($appconfig->get_all()->getResult() as $app_config)
|
||||
{
|
||||
$this->settings[$app_config->key] = $app_config->value;
|
||||
|
||||
Reference in New Issue
Block a user