Declared class properties

PHP 8.2 deprecates dynamically declared class properties. Adding these declarations removes deprecation warnings and makes the code PHP 8.3 compatible.
This commit is contained in:
objecttothis
2023-11-30 20:41:01 +04:00
committed by jekkos
parent 283ee4d7c6
commit 70ee1ed36e
2 changed files with 6 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
namespace app\Libraries;
use CodeIgniter\Model;
use CodeIgniter\Session\Session;
use App\Models\Stock_location;
@@ -16,6 +17,9 @@ use App\Models\Stock_location;
class Item_lib
{
private Session $session;
private Model $stock_location;
public function __construct()
{
$this->session = Session();

View File

@@ -25,6 +25,8 @@ class Stock_location extends Model
'deleted'
];
private Session $session;
public function __construct()
{
parent::__construct();