From 530186c59d78ed847014c9cb17a601d80dd6ebe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 10 Feb 2015 13:32:00 +0100 Subject: [PATCH] PHPDoc and misc fixes for several folders --- htdocs/contact/class/contact.class.php | 2 -- htdocs/contrat/card.php | 2 +- htdocs/contrat/class/contrat.class.php | 11 +++++------ htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/vcard.class.php | 2 +- htdocs/core/lib/contact.lib.php | 4 ++-- htdocs/core/lib/contract.lib.php | 4 ++-- 7 files changed, 12 insertions(+), 15 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 6a7776b27bd..c906488b35b 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -996,8 +996,6 @@ class Contact extends CommonObject */ function initAsSpecimen() { - global $user,$langs; - // Get first id of existing company and save it into $socid $socid = 0; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe ORDER BY rowid LIMIT 1"; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index b2b99a9dde3..fdd0acfec74 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -659,7 +659,7 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contr // Close all lines else if ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) { - $result = $object->cloture($user); + $object->cloture($user); } else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 37be98fa2c4..d2bbe28726a 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -236,7 +236,6 @@ class Contrat extends CommonObject } $obj = new $classname(); - $numref = ""; $numref = $obj->getNextValue($soc,$this); if ( $numref != "") @@ -1589,11 +1588,11 @@ class Contrat extends CommonObject // Load $this->lines array // $this->fetch_lines(); - $newstatut=1; - foreach($this->lines as $key => $contractline) - { - // if ($contractline) // Loop on each service - } +// $newstatut=1; +// foreach($this->lines as $key => $contractline) +// { +// // if ($contractline) // Loop on each service +// } return 1; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index c9ff161cef1..8a8258ca641 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2412,7 +2412,7 @@ abstract class CommonObject * TODO Move this into html.class.php * But for the moment we don't know if it's possible as we keep a method available on overloaded objects. * - * @return void + * @return int */ function showLinkedObjectBlock() { diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 512aa011d98..bc9f9081a49 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -306,7 +306,7 @@ class vCard /** * permet d'obtenir une vcard * - * @return void + * @return string */ function getVCard() { diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 8d9ba9296a4..3eeca82c993 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -25,10 +25,10 @@ /** * Prepare array with list of tabs * - * @param Object $object Object related to tabs + * @param Contact $object Object related to tabs * @return array Array of tabs to show */ -function contact_prepare_head($object) +function contact_prepare_head(Contact $object) { global $langs, $conf, $user; diff --git a/htdocs/core/lib/contract.lib.php b/htdocs/core/lib/contract.lib.php index b7e82c6dbf2..fff83e4c4bc 100644 --- a/htdocs/core/lib/contract.lib.php +++ b/htdocs/core/lib/contract.lib.php @@ -25,10 +25,10 @@ /** * Prepare array with list of tabs * - * @param Object $object Object related to tabs + * @param Contrat $object Object related to tabs * @return array Array of tabs to show */ -function contract_prepare_head($object) +function contract_prepare_head(Contrat $object) { global $langs, $conf; $h = 0;