From a124f47dcd8816695fe570b169ff86df9c6844ab Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 4 Oct 2017 12:07:17 +0200 Subject: [PATCH] Fix: PHPCS --- htdocs/categories/class/categorie.class.php | 2 +- htdocs/core/class/comment.class.php | 18 +++++++++++------- htdocs/core/class/ldap.class.php | 6 +++--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 6027f76ec58..6242691d1f1 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -882,7 +882,7 @@ class Categorie extends CommonObject /** * List categories of an element id * - * @param int $item Id of element + * @param int $id Id of element * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') * @param string $sortfield Sort field * @param string $sortorder Sort order diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 0ec77405721..bc87b282d56 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -1,4 +1,6 @@ -db = $db; } - + /** * Create into database @@ -280,12 +282,14 @@ class Comment extends CommonObject return 1; } } - - + + /** * Load comments linked with current task * - * @return array Comment array + * @param alpha $element_type Type of Element + * @param int $fk_element Id of Element + * @return array Comment array */ public static function fetchAllFor($element_type, $fk_element) { @@ -299,7 +303,7 @@ class Comment extends CommonObject $sql.= " AND c.element_type = '".$element_type."'"; $sql.= " AND c.entity = ".$conf->entity; $sql.= " ORDER BY c.tms DESC"; - + dol_syslog("Comment::fetchAllFor", LOG_DEBUG); $resql=$db->query($sql); if ($resql) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 396bcb5941a..930a9f10997 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -511,11 +511,11 @@ class Ldap * @param string $dn Old DN entry key (uid=qqq,ou=xxx,dc=aaa,dc=bbb) (before update) * @param string $newrdn New RDN entry key (uid=qqq) * @param string $newparent New parent (ou=xxx,dc=aaa,dc=bbb) - * @param bool $deleteoldrdn If TRUE the old RDN value(s) is removed, else the old RDN value(s) is retained as non-distinguished values of the entry. * @param User $user Objet user that modify + * @param bool $deleteoldrdn If TRUE the old RDN value(s) is removed, else the old RDN value(s) is retained as non-distinguished values of the entry. * @return int <0 if KO, >0 if OK */ - function rename($dn, $newrdn, $newparent, $deleteoldrdn = true, $user) + function rename($dn, $newrdn, $newparent, $user, $deleteoldrdn = true) { global $conf; @@ -589,7 +589,7 @@ class Ldap if (! empty($olddn) && ! empty($newrdn) && ! empty($newparent) && $conf->global->LDAP_SERVER_PROTOCOLVERSION === '3') { // This function currently only works with LDAPv3 - $result = $this->rename($olddn, $newrdn, $newparent, true, $user); + $result = $this->rename($olddn, $newrdn, $newparent, $user, true); } else {