Ver Fonte

Clean code

Laurent Destailleur há 2 anos atrás
pai
commit
e16d944284

+ 1 - 1
htdocs/adherents/canvas/actions_adherentcard_common.class.php

@@ -241,7 +241,7 @@ abstract class ActionsAdherentCardCommon
 	/**
 	 *  Assign POST values into object
 	 *
-	 *  @return		string					HTML output
+	 *  @return		void
 	 */
 	private function assign_post()
 	{

+ 1 - 1
htdocs/contact/canvas/actions_contactcard_common.class.php

@@ -278,7 +278,7 @@ abstract class ActionsContactCardCommon
 	/**
 	 *  Assign POST values into object
 	 *
-	 *  @return		string					HTML output
+	 *  @return		void
 	 */
 	private function assign_post()
 	{

+ 1 - 1
htdocs/societe/canvas/actions_card_common.class.php

@@ -382,7 +382,7 @@ abstract class ActionsCardCommon
 	 *  Assign POST values into object
 	 *
 	 *	@param		string		$action		Action string
-	 *  @return		string					HTML output
+	 *  @return		void
 	 */
 	private function assign_post($action)
 	{

+ 3 - 1
htdocs/user/class/userbankaccount.class.php

@@ -101,10 +101,12 @@ class UserBankAccount extends Account
 				$this->id = $this->db->last_insert_id($this->db->prefix()."user_rib");
 
 				return $this->update($user);
+			} else {
+				return 0;
 			}
 		} else {
 			print $this->db->error();
-			return 0;
+			return -1;
 		}
 	}
 

+ 6 - 2
htdocs/variants/class/ProductAttribute.class.php

@@ -976,7 +976,7 @@ class ProductAttribute extends CommonObject
 	 * 	Update a attribute to have a higher position
 	 *
 	 * @param	int		$rowid		Id of line
-	 * @return	int					<0 KO >0 OK
+	 * @return	int					<0 KO, >0 OK
 	 */
 	public function attributeMoveUp($rowid)
 	{
@@ -987,13 +987,15 @@ class ProductAttribute extends CommonObject
 
 		// Update position of attribute
 		$this->updateAttributePositionUp($rowid, $position);
+
+		return 1;
 	}
 
 	/**
 	 * 	Update a attribute to have a lower position
 	 *
 	 * @param	int		$rowid		Id of line
-	 * @return	int					<0 KO >0 OK
+	 * @return	int					<0 KO, >0 OK
 	 */
 	public function attributeMoveDown($rowid)
 	{
@@ -1007,6 +1009,8 @@ class ProductAttribute extends CommonObject
 
 		// Update position of attribute
 		$this->updateAttributePositionDown($rowid, $position, $max);
+
+		return 1;
 	}
 
 	/**