fix phpstan

This commit is contained in:
Frédéric FRANCE 2024-12-11 20:03:59 +01:00
parent ba6bbdda0e
commit 9733ac1f59
No known key found for this signature in database
GPG key ID: C06E4A9656127239
2 changed files with 10 additions and 52 deletions

View file

@ -28482,42 +28482,6 @@ parameters:
count: 1
path: ../../htdocs/public/payment/newpayment.php
-
message: '#^Variable \$PAYPAL_API_KO might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../htdocs/public/payment/newpayment.php
-
message: '#^Variable \$PAYPAL_API_OK might not be defined\.$#'
identifier: variable.undefined
count: 2
path: ../../htdocs/public/payment/newpayment.php
-
message: '#^Variable \$PAYPAL_API_PASSWORD might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/public/payment/newpayment.php
-
message: '#^Variable \$PAYPAL_API_SANDBOX might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/public/payment/newpayment.php
-
message: '#^Variable \$PAYPAL_API_SIGNATURE might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/public/payment/newpayment.php
-
message: '#^Variable \$PAYPAL_API_USER might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/public/payment/newpayment.php
-
message: '#^Variable \$attendee might not be defined\.$#'
identifier: variable.undefined

View file

@ -77,23 +77,17 @@ $hookmanager->initHooks(array('newpayment'));
$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "paybox", "paypal", "stripe"));
// Clean parameters
$PAYPAL_API_USER = "";
$PAYPAL_API_PASSWORD = "";
$PAYPAL_API_SIGNATURE = "";
$PAYPAL_API_SANDBOX = "";
$PAYPALTOKEN = "";
$PAYPALPAYERID = "";
if (isModEnabled('paypal')) {
$PAYPAL_API_USER = "";
if (getDolGlobalString('PAYPAL_API_USER')) {
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
}
$PAYPAL_API_PASSWORD = "";
if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
}
$PAYPAL_API_SIGNATURE = "";
if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
}
$PAYPAL_API_SANDBOX = "";
if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
}
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
/*$PAYPAL_API_OK = "";
if ($urlok) {
$PAYPAL_API_OK = $urlok;