diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml
index 32a938662e6..b8cb751fe9e 100644
--- a/dev/setup/codesniffer/ruleset.xml
+++ b/dev/setup/codesniffer/ruleset.xml
@@ -126,7 +126,7 @@
-
+
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 513a99d843f..037d27ea852 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -1562,7 +1562,7 @@ class Adherent extends CommonObject
*
* @param int $withpictoimg 0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo, -3=Only photo very small)
* @param int $maxlen length max label
- * @param string $option Page for link
+ * @param string $option Page for link ('card', 'category', 'subscription', ...)
* @param string $mode ''=Show firstname and lastname, 'firstname'=Show only firstname, 'login'=Show login, 'ref'=Show ref
* @param string $morecss Add more css on link
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
@@ -1592,10 +1592,7 @@ class Adherent extends CommonObject
$label.= ' ' . $langs->trans('Name') . ': ' . $this->getFullName($langs);
$label.='';
- if (empty($option) || $option == 'card' || $option == 'category')
- {
- $url = DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id;
- }
+ $url = DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id;
if ($option == 'subscription')
{
$url = DOL_URL_ROOT.'/adherents/subscription.php?rowid='.$this->id;
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index 30c85618bfa..5537730e678 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -59,7 +59,7 @@ class AdherentType extends CommonObject
public $note;
/** @var bool Can vote*/
public $vote;
- /** @var bool Email sent during validation */
+ /** @var string Email sent during validation */
public $mail_valid;
/** @var array Array of members */
public $members=array();
@@ -481,7 +481,7 @@ class AdherentType extends CommonObject
// Initialise parametres
$this->id = 0;
- $this->ref = 0;
+ $this->ref = 'MTSPEC';
$this->specimen=1;
$this->label='MEMBERS TYPE SPECIMEN';
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 673ce2f2d24..068513b245c 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1749,7 +1749,7 @@ $db->close();
* @param Object $obj If we show a particular record, obj is filled with record fields
* @param string $tabname Name of SQL table
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
- * @return void
+ * @return string '' or value of entity into table
*/
function fieldList($fieldlist, $obj='', $tabname='', $context='')
{
@@ -1763,7 +1763,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
$formcompany = new FormCompany($db);
if (! empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db);
- $withentity=null;
+ $withentity='';
foreach ($fieldlist as $field => $value)
{
diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php
index 670d47ba3ee..123b5f50bd8 100644
--- a/htdocs/api/class/api_documents.class.php
+++ b/htdocs/api/class/api_documents.class.php
@@ -104,7 +104,7 @@ class Documents extends DolibarrApi
{
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$this->invoice = new Facture($this->db);
- $result = $this->invoice->fetch(0, $ref);
+ $result = $this->invoice->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file)));
if( ! $result ) {
throw new RestException(404, 'Invoice not found');
}
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index b4381349aec..73634f0d5e8 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -930,7 +930,7 @@ class ExtraFields
if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format.
$value=price($value);
}
- $out.=' '.$langs->getCurrencySymbol($conf->currency);
+ $out=' '.$langs->getCurrencySymbol($conf->currency);
}
elseif ($type == 'double')
{
diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php
index 129bbcedf38..247dc4ac6ae 100644
--- a/htdocs/core/login/functions_ldap.php
+++ b/htdocs/core/login/functions_ldap.php
@@ -138,7 +138,7 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest)
$ldap->searchUser=$ldapuserattr."=".$usertotest.",".$ldapdn; // Default dn (will work if LDAP accept a dn with login value inside)
// But if LDAP need a dn with name like "cn=Jhon Bloggs,ou=People,dc=foo,dc=com", previous part must have been executed to have
// dn detected into ldapUserDN.
- if ($resultFetchLdapUser AND !empty($ldap->ldapUserDN)) $ldap->searchUser = $ldap->ldapUserDN;
+ if ($resultFetchLdapUser && !empty($ldap->ldapUserDN)) $ldap->searchUser = $ldap->ldapUserDN;
$ldap->searchPassword=$passwordtotest;
// Test with this->seachUser and this->searchPassword
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index b11389905a4..11f8b70f26b 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -328,14 +328,14 @@ class DolibarrModules // Can not be abstract, because we need to insta
public $langfiles;
/**
- * @var string[] Array of warnings to show when we activate the module
+ * @var array Array of warnings to show when we activate the module
*
* array('always'='text') or array('FR'='text')
*/
public $warnings_activation;
/**
- * @var string[] Array of warnings to show when we activate an external module
+ * @var array Array of warnings to show when we activate an external module
*
* array('always'='text') or array('FR'='text')
*/
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php
index 24027375528..f3e0146a719 100644
--- a/htdocs/core/modules/dons/html_cerfafr.modules.php
+++ b/htdocs/core/modules/dons/html_cerfafr.modules.php
@@ -136,27 +136,27 @@ class html_cerfafr extends ModeleDon
else $paymentmode = '';
if ($don->modepaiementid==7){
- $ModePaiement = '
Remise d\'espèces
Chèque
Virement, prélèvement, carte bancaire
';
+ $ModePaiement = '
Remise d\'espèces
Chèque
Virement, prélèvement, carte bancaire
';
}
else if ($don->modepaiementid==4){
- $ModePaiement = '
Remise d\'espèces
Chèque
Virement, prélèvement, carte bancaire
';
+ $ModePaiement = '
Remise d\'espèces
Chèque
Virement, prélèvement, carte bancaire
';
}
- else if ($don->modepaiementid==2 OR $don->modepaiementid==3 OR $don->modepaiementid==6){
- $ModePaiement = '