2
0
forked from Wavyzz/dolibarr

fix ignored phpstan (most of expects string, int given) (#30649)

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
This commit is contained in:
Frédéric FRANCE
2024-09-05 16:05:37 +02:00
committed by GitHub
parent 97a9e2b3b0
commit 80d1f47d4d
198 changed files with 520 additions and 411 deletions

View File

@@ -2110,7 +2110,7 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname && $user->hasRig
// check if module is enabled
if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
@@ -2419,7 +2419,7 @@ if ($dirins && $action == 'addright' && !empty($module) && empty($cancel) && $us
if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
@@ -2538,7 +2538,7 @@ if ($dirins && GETPOST('action') == 'update_right' && GETPOST('modifyright') &&
if (!$error) {
if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
@@ -2588,7 +2588,7 @@ if ($dirins && $action == 'confirm_deleteright' && !empty($module) && GETPOSTINT
// check if module is enabled
if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
@@ -2732,7 +2732,7 @@ if ($dirins && $action == 'confirm_deletemenu' && GETPOSTINT('menukey') && $user
// check if module is enabled
if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
@@ -2794,7 +2794,7 @@ if ($dirins && $action == 'addmenu' && empty($cancel) && $user->hasRight("module
// check if module is enabled
if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
@@ -2953,7 +2953,7 @@ if ($dirins && $action == "update_menu" && GETPOSTINT('menukey') && GETPOST('tab
if (empty($cancel)) {
if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
@@ -3054,7 +3054,7 @@ if ($dirins && $action == "update_menu" && GETPOSTINT('menukey') && GETPOST('tab
if ($dirins && $action == "update_props_module" && !empty(GETPOST('keydescription', 'alpha')) && empty($cancel) && $user->hasRight("modulebuilder", "run")) {
if (isModEnabled(strtolower($module))) {
$result = unActivateModule(strtolower($module));
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}

View File

@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) ---Replace with your own copyright and developer email---
*
* This program is free software; you can redistribute it and/or modify
@@ -225,7 +226,7 @@ class MyModuleApi extends DolibarrApi
continue;
}
$this->myobject->$field = $this->_checkValForAPI($field, $value, $this->myobject);
$this->myobject->$field = $this->_checkValForAPI((string) $field, $value, $this->myobject);
}
// Clean data

View File

@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2007-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) ---Replace with your own copyright and developer email---
*
* This program is free software; you can redistribute it and/or modify
@@ -174,7 +175,7 @@ $arrayfields = array();
foreach ($object->fields as $key => $val) {
// If $val['visible']==0, then we never show the field
if (!empty($val['visible'])) {
$visible = (int) dol_eval($val['visible'], 1);
$visible = (int) dol_eval((string) $val['visible'], 1);
$arrayfields['t.'.$key] = array(
'label' => $val['label'],
'checked' => (($visible < 0) ? 0 : 1),