phpan/phpstan clean up runs, minor update to DB\IO

DB\IO dbReturn method has a third parameter to set read only assoc and
not number data from the query

Install basic composer for trying out psalm

setting phpan/phpstan for basic static checking and do basic clean up on
all of the files
This commit is contained in:
Clemens Schwaighofer
2019-09-18 09:25:35 +09:00
parent 25941f4b49
commit 9ea8364aab
42 changed files with 1179 additions and 242 deletions

View File

@@ -23,7 +23,7 @@ extract($_POST, EXTR_SKIP);
// set output to quiet for load of classes & session settings
ob_start();
// set the session name
define('SET_SESSION_NAME', EDIT_SESSION_NAME);
$SET_SESSION_NAME = EDIT_SESSION_NAME;
//------------------------------ library include end
//------------------------------ basic variable settings start
@@ -48,7 +48,7 @@ if (isset($AJAX_PAGE) && isset($ZIP_STREAM) && $AJAX_PAGE && !$ZIP_STREAM) {
//------------------------------ class init start
// login & page access check
$login = new CoreLibs\ACL\Login($DB_CONFIG[LOGIN_DB], $lang);
$login = new CoreLibs\ACL\Login(DB_CONFIG, $lang);
// post login lang check
if ($_SESSION['DEFAULT_LANG']) {
$lang = $_SESSION['DEFAULT_LANG'];
@@ -56,7 +56,7 @@ if ($_SESSION['DEFAULT_LANG']) {
// create smarty object
$smarty = new CoreLibs\Template\SmartyExtend($lang);
// create new DB class
$cms = new CoreLibs\Admin\Backend($DB_CONFIG[MAIN_DB], $lang);
$cms = new CoreLibs\Admin\Backend(DB_CONFIG, $lang);
// the menu show flag (what menu to show)
$cms->menu_show_flag = 'main';
// db nfo