Fix phpcs

This commit is contained in:
Laurent Destailleur 2019-05-16 14:38:01 +02:00
parent ac1bab1711
commit 399ffb2dcc
11 changed files with 47 additions and 79 deletions

View File

@ -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';

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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";

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{