fix phpstan

This commit is contained in:
Frédéric France 2024-12-10 20:07:37 +01:00
parent 612b943cfa
commit 99bf3064f1
No known key found for this signature in database
GPG Key ID: CE25B0B7B53B9177
3 changed files with 12 additions and 50 deletions

View File

@ -5280,12 +5280,6 @@ parameters:
count: 1
path: ../../htdocs/compta/bank/class/paymentvarious.class.php
-
message: '#^Call to function property_exists\(\) with \$this\(PaymentVarious\) and ''fk_bank'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../htdocs/compta/bank/class/paymentvarious.class.php
-
message: '#^Property PaymentVarious\:\:\$accountid \(int\) in isset\(\) is not nullable\.$#'
identifier: isset.property
@ -34242,48 +34236,6 @@ parameters:
count: 1
path: ../../scripts/emailings/reset-invalid-emails.php
-
message: '#^Variable \$conf might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php
-
message: '#^Variable \$hookmanager might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php
-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../scripts/invoices/email_unpaid_invoices_to_customers.php
-
message: '#^Variable \$conf might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php
-
message: '#^Variable \$db might not be defined\.$#'
identifier: variable.undefined
count: 6
path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php
-
message: '#^Variable \$hookmanager might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php
-
message: '#^Variable \$langs might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../scripts/invoices/email_unpaid_invoices_to_representatives.php
-
message: '#^Variable \$conf might not be defined\.$#'
identifier: variable.undefined

View File

@ -57,7 +57,12 @@ $targettype = $argv[2];
require $path."../../htdocs/master.inc.php";
require_once DOL_DOCUMENT_ROOT.'/core/lib/functionscli.lib.php';
require_once DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php";
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
*/
$langs->load('main');
// Global variables

View File

@ -55,7 +55,12 @@ $mode = $argv[1];
require $path."../../htdocs/master.inc.php";
require_once DOL_DOCUMENT_ROOT.'/core/lib/functionscli.lib.php';
require_once DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php";
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
*/
$langs->load('main');
// Global variables