diff --git a/build/phpstan/bootstrap.php b/build/phpstan/bootstrap.php index 7f232860a2b..e567b609a2f 100644 --- a/build/phpstan/bootstrap.php +++ b/build/phpstan/bootstrap.php @@ -9,7 +9,6 @@ define('DOL_DATA_ROOT', __DIR__ . '/../../documents'); define('DOL_URL_ROOT', '/'); // Load the main.inc.php file to have finctions llx_Header and llx_Footer defined -if (! defined("NOLOGIN")) define("NOLOGIN",'1'); +if (! defined("NOLOGIN")) define("NOLOGIN", '1'); global $conf, $langs, $user, $db; include_once __DIR__ . '/../../htdocs/main.inc.php'; - diff --git a/scripts/contracts/email_expire_services_to_customers.php b/scripts/contracts/email_expire_services_to_customers.php index 041f9dd0b1c..3201cb66d89 100755 --- a/scripts/contracts/email_expire_services_to_customers.php +++ b/scripts/contracts/email_expire_services_to_customers.php @@ -209,21 +209,14 @@ if ($resql) { /** * Send email * - * @param string $mode - * Mode (test | confirm) - * @param string $oldemail - * Target email - * @param string $message - * Message to send - * @param string $total - * Total amount of unpayed invoices - * @param string $userlang - * Code lang to use for email output. - * @param string $oldtarget - * Target name - * @param int $duration_value - * duration value - * @return int <0 if KO, >0 if OK + * @param string $mode Mode (test | confirm) + * @param string $oldemail Target email + * @param string $message Message to send + * @param string $total Total amount of unpayed invoices + * @param string $userlang Code lang to use for email output. + * @param string $oldtarget Target name + * @param int $duration_value duration value + * @return int <0 if KO, >0 if OK */ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget, $duration_value) { diff --git a/scripts/contracts/email_expire_services_to_representatives.php b/scripts/contracts/email_expire_services_to_representatives.php index be63d4804f9..669d7f8132f 100755 --- a/scripts/contracts/email_expire_services_to_representatives.php +++ b/scripts/contracts/email_expire_services_to_representatives.php @@ -168,21 +168,14 @@ if ($resql) { /** * Send email * - * @param string $mode - * Mode (test | confirm) - * @param string $oldemail - * Old email - * @param string $message - * Message to send - * @param string $total - * Total amount of unpayed invoices - * @param string $userlang - * Code lang to use for email output. - * @param string $oldsalerepresentative - * Old sale representative - * @param int $duration_value - * duration value - * @return int <0 if KO, >0 if OK + * @param string $mode Mode (test | confirm) + * @param string $oldemail Old email + * @param string $message Message to send + * @param string $total Total amount of unpayed invoices + * @param string $userlang Code lang to use for email output. + * @param string $oldsalerepresentative Old sale representative + * @param int $duration_value Duration value + * @return int <0 if KO, >0 if OK */ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepresentative, $duration_value) { diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 54559e28c19..0f4f1fecde7 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -229,16 +229,12 @@ exit(0); /** * script cron usage * - * @param string $path - * path - * @param string $script_file - * filename + * @param string $path Path + * @param string $script_file Filename * @return void */ function usage($path, $script_file) { - global $conf; - print "Usage: " . $script_file . " securitykey userlogin|'firstadmin' [cronjobid]\n"; print "The script return 0 when everything worked successfully.\n"; print "\n"; diff --git a/scripts/invoices/email_unpaid_invoices_to_customers.php b/scripts/invoices/email_unpaid_invoices_to_customers.php index e64c9e10edb..3df09258ec1 100755 --- a/scripts/invoices/email_unpaid_invoices_to_customers.php +++ b/scripts/invoices/email_unpaid_invoices_to_customers.php @@ -207,19 +207,13 @@ if ($resql) { /** * Send email * - * @param string $mode - * Mode (test | confirm) - * @param string $oldemail - * Target email - * @param string $message - * Message to send - * @param string $total - * Total amount of unpayed invoices - * @param string $userlang - * Code lang to use for email output. - * @param string $oldtarget - * Target name - * @return int <0 if KO, >0 if OK + * @param string $mode Mode (test | confirm) + * @param string $oldemail Target email + * @param string $message Message to send + * @param string $total Total amount of unpayed invoices + * @param string $userlang Code lang to use for email output. + * @param string $oldtarget Target name + * @return int <0 if KO, >0 if OK */ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldtarget) { diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index bf4264d57ba..396c6d6738a 100755 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -172,19 +172,13 @@ if ($resql) { /** * Send email * - * @param string $mode - * Mode (test | confirm) - * @param string $oldemail - * Old email - * @param string $message - * Message to send - * @param string $total - * Total amount of unpayed invoices - * @param string $userlang - * Code lang to use for email output. - * @param string $oldsalerepresentative - * Old sale representative - * @return int <0 if KO, >0 if OK + * @param string $mode Mode (test | confirm) + * @param string $oldemail Old email + * @param string $message Message to send + * @param string $total Total amount of unpayed invoices + * @param string $userlang Code lang to use for email output. + * @param string $oldsalerepresentative Old sale representative + * @return int <0 if KO, >0 if OK */ function envoi_mail($mode, $oldemail, $message, $total, $userlang, $oldsalerepresentative) { diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index 3a7aee9c5df..f1e58dd3554 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -272,12 +272,12 @@ if ($result >= 0) { exit($error); + /** * Function to say if a value is empty or not * - * @param string $element - * Value to test - * @return boolean True of false + * @param string $element Value to test + * @return boolean True of false */ function dolValidElement($element) { diff --git a/scripts/members/sync_members_types_ldap2dolibarr.php b/scripts/members/sync_members_types_ldap2dolibarr.php index fe9a07e14da..9dcc47e45af 100755 --- a/scripts/members/sync_members_types_ldap2dolibarr.php +++ b/scripts/members/sync_members_types_ldap2dolibarr.php @@ -181,12 +181,12 @@ if ($result >= 0) { exit($error); + /** * Function to say if a value is empty or not * - * @param string $element - * Value to test - * @return boolean True of false + * @param string $element Value to test + * @return boolean True of false */ function dolValidElementType($element) { diff --git a/scripts/product/migrate_picture_path.php b/scripts/product/migrate_picture_path.php index 7abbcc59cc5..8d10ce52840 100755 --- a/scripts/product/migrate_picture_path.php +++ b/scripts/product/migrate_picture_path.php @@ -86,9 +86,8 @@ exit($error); /** * Migrate file from old path to new one for product $product * - * @param Product $product - * Object product - * @return void + * @param Product $product Object product + * @return void */ function migrate_product_photospath($product) { diff --git a/scripts/user/sync_groups_ldap2dolibarr.php b/scripts/user/sync_groups_ldap2dolibarr.php index 393a866de5e..93378242c9d 100755 --- a/scripts/user/sync_groups_ldap2dolibarr.php +++ b/scripts/user/sync_groups_ldap2dolibarr.php @@ -230,12 +230,12 @@ if ($result >= 0) { exit($error); + /** * Function to say if a value is empty or not * - * @param string $element - * Value to test - * @return boolean True of false + * @param string $element Value to test + * @return boolean True of false */ function dolValidElement($element) { diff --git a/scripts/user/sync_users_ldap2dolibarr.php b/scripts/user/sync_users_ldap2dolibarr.php index 75925b109bf..dfc8fb737ba 100755 --- a/scripts/user/sync_users_ldap2dolibarr.php +++ b/scripts/user/sync_users_ldap2dolibarr.php @@ -273,12 +273,12 @@ if ($result >= 0) { exit($error); + /** * Function to say if a value is empty or not * - * @param string $element - * Value to test - * @return boolean True of false + * @param string $element Value to test + * @return boolean True of false */ function dolValidElement($element) {