mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-23 18:36:26 -05:00
- 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
35 lines
540 B
PHP
35 lines
540 B
PHP
<?php
|
|
|
|
namespace App\Models\Tokens;
|
|
|
|
use App\Models\Appconfig;
|
|
use ReflectionException;
|
|
|
|
/**
|
|
* Token_quote_sequence class
|
|
**/
|
|
class Token_quote_sequence extends Token
|
|
{
|
|
private Appconfig $appconfig;
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->appconfig = model(AppConfig::class);
|
|
|
|
}
|
|
|
|
public function token_id(): string
|
|
{
|
|
return 'QSEQ';
|
|
}
|
|
|
|
/**
|
|
* @throws ReflectionException
|
|
*/
|
|
public function get_value(bool $save = TRUE): string
|
|
{
|
|
return $this->appconfig->acquire_next_quote_sequence($save);
|
|
}
|
|
}
|