phpstan config update, move const in basic into class
the basic class const for self checks are class const variables now
This commit is contained in:
33
phpstan.neon
33
phpstan.neon
@@ -12,19 +12,10 @@ parameters:
|
|||||||
- www/configs/config.master.php
|
- www/configs/config.master.php
|
||||||
- www/lib/autoloader.php
|
- www/lib/autoloader.php
|
||||||
excludes_analyse:
|
excludes_analyse:
|
||||||
- www/includes/admin_header.php # ignore the admin include stuff
|
# no check admin
|
||||||
- www/includes/admin_footer.php # ignore the admin include stuff
|
- www/admin/qq_file_upload_front.php
|
||||||
- www/includes/admin_set_paths.php # ignore the admin include stuff
|
- www/admin/qq_file_upload_ajax.php
|
||||||
- www/includes/admin_smarty.php # ignore the admin include stuff
|
# admin synlink files
|
||||||
- www/templates_c
|
|
||||||
- www/cache
|
|
||||||
- www/log
|
|
||||||
- www/media
|
|
||||||
- www/tmp
|
|
||||||
- www/lib/pChart
|
|
||||||
- www/lib/pChart2.1.4
|
|
||||||
- www/lib/Smarty/
|
|
||||||
- www/lib/smarty-3.1.30/
|
|
||||||
- www/admin/edit_access.php
|
- www/admin/edit_access.php
|
||||||
- www/admin/edit_groups.php
|
- www/admin/edit_groups.php
|
||||||
- www/admin/edit_languages.php
|
- www/admin/edit_languages.php
|
||||||
@@ -34,4 +25,20 @@ parameters:
|
|||||||
- www/admin/edit_schemes.php
|
- www/admin/edit_schemes.php
|
||||||
- www/admin/edit_users.php
|
- www/admin/edit_users.php
|
||||||
- www/admin/edit_visible_group.php
|
- www/admin/edit_visible_group.php
|
||||||
|
# ignore admin header stuff
|
||||||
|
- www/includes/admin_header.php # ignore the admin include stuff
|
||||||
|
- www/includes/admin_footer.php # ignore the admin include stuff
|
||||||
|
- www/includes/admin_set_paths.php # ignore the admin include stuff
|
||||||
|
- www/includes/admin_smarty.php # ignore the admin include stuff
|
||||||
|
# folders with data no check needed
|
||||||
|
- www/templates_c
|
||||||
|
- www/cache
|
||||||
|
- www/log
|
||||||
|
- www/media
|
||||||
|
- www/tmp
|
||||||
|
- www/lib/pChart
|
||||||
|
- www/lib/pChart2.1.4
|
||||||
|
- www/lib/Smarty/
|
||||||
|
- www/lib/smarty-3.1.30/
|
||||||
|
# ignore composer
|
||||||
- www/vendor
|
- www/vendor
|
||||||
|
|||||||
@@ -157,7 +157,12 @@ if ($form->my_page_name == 'edit_order') {
|
|||||||
}
|
}
|
||||||
$q .= "ORDER BY order_number";
|
$q .= "ORDER BY order_number";
|
||||||
|
|
||||||
|
// init arrays
|
||||||
$row_data = array();
|
$row_data = array();
|
||||||
|
$options_id = array();
|
||||||
|
$options_name = array();
|
||||||
|
$options_selected = array();
|
||||||
|
// DB read data for menu
|
||||||
while ($res = $form->dbReturn($q)) {
|
while ($res = $form->dbReturn($q)) {
|
||||||
$row_data[] = array(
|
$row_data[] = array(
|
||||||
"id" => $res[$table_name."_id"],
|
"id" => $res[$table_name."_id"],
|
||||||
@@ -180,12 +185,6 @@ if ($form->my_page_name == 'edit_order') {
|
|||||||
$DATA['form_error_msg'] = $messages;
|
$DATA['form_error_msg'] = $messages;
|
||||||
|
|
||||||
// all the row data
|
// all the row data
|
||||||
$options_id = array();
|
|
||||||
$options_name = array();
|
|
||||||
$options_selected = array();
|
|
||||||
if (!isset($row_data) || !is_array($row_data)) {
|
|
||||||
$row_data = array();
|
|
||||||
}
|
|
||||||
for ($i = 0; $i < count($row_data); $i ++) {
|
for ($i = 0; $i < count($row_data); $i ++) {
|
||||||
$options_id[] = $i;
|
$options_id[] = $i;
|
||||||
$options_name[] = $row_data[$i]['name'];
|
$options_name[] = $row_data[$i]['name'];
|
||||||
|
|||||||
@@ -94,13 +94,13 @@
|
|||||||
|
|
||||||
namespace CoreLibs;
|
namespace CoreLibs;
|
||||||
|
|
||||||
// define check vars for the flags we can have
|
|
||||||
const CLASS_STRICT_MODE = 1;
|
|
||||||
const CLASS_OFF_COMPATIBLE_MODE = 2;
|
|
||||||
|
|
||||||
/** Basic core class declaration */
|
/** Basic core class declaration */
|
||||||
class Basic
|
class Basic
|
||||||
{
|
{
|
||||||
|
// define check vars for the flags we can have
|
||||||
|
const CLASS_STRICT_MODE = 1;
|
||||||
|
const CLASS_OFF_COMPATIBLE_MODE = 2;
|
||||||
// control vars
|
// control vars
|
||||||
/** @var bool compatible mode sets variable even if it is not defined */
|
/** @var bool compatible mode sets variable even if it is not defined */
|
||||||
private $set_compatible = true;
|
private $set_compatible = true;
|
||||||
@@ -438,12 +438,12 @@ class Basic
|
|||||||
$set_control_flag = $GLOBALS['CLASS_VARIABLE_ERROR_MODE'];
|
$set_control_flag = $GLOBALS['CLASS_VARIABLE_ERROR_MODE'];
|
||||||
}
|
}
|
||||||
// bit wise check of int and set
|
// bit wise check of int and set
|
||||||
if ($set_control_flag & CLASS_OFF_COMPATIBLE_MODE) {
|
if ($set_control_flag & self::CLASS_OFF_COMPATIBLE_MODE) {
|
||||||
$this->set_compatible = false;
|
$this->set_compatible = false;
|
||||||
} else {
|
} else {
|
||||||
$this->set_compatible = true;
|
$this->set_compatible = true;
|
||||||
}
|
}
|
||||||
if ($set_control_flag & CLASS_STRICT_MODE) {
|
if ($set_control_flag & self::CLASS_STRICT_MODE) {
|
||||||
$this->set_strict_mode = true;
|
$this->set_strict_mode = true;
|
||||||
} else {
|
} else {
|
||||||
$this->set_strict_mode = false;
|
$this->set_strict_mode = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user