From 4ff28d4580547878468113245b072de4ade2b965 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 15 Dec 2018 14:11:59 +0100 Subject: [PATCH] Fix phpcs --- htdocs/reception/class/reception.class.php | 16 +++------------- htdocs/reception/class/receptionstats.class.php | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 0f6837985fc..eac97f4d5fd 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -269,8 +269,6 @@ class Reception extends CommonObject { $error++; } - - } if (! $error && $this->id && $this->origin_id) @@ -322,7 +320,6 @@ class Reception extends CommonObject $this->db->rollback(); return -1*$error; } - } else { @@ -522,7 +519,6 @@ class Reception extends CommonObject $soc->fetch($this->socid); - // Define new ref if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { @@ -742,8 +738,6 @@ class Reception extends CommonObject $this->error=$langs->trans("ErrorWarehouseRequiredIntoReceptionLine"); return -1; } - - } // extrafields @@ -799,7 +793,6 @@ class Reception extends CommonObject if (isset($this->modelpdf)) $this->modelpdf=trim($this->modelpdf); - // Check parameters // Put here code to add control on parameters values @@ -881,7 +874,6 @@ class Reception extends CommonObject $this->error=''; - $this->db->begin(); // Stock control if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_RECEPTION && $this->statut > 0) @@ -913,8 +905,6 @@ class Reception extends CommonObject $result=$mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ReceptionDeletedInDolibarr", $this->ref),'', $obj->eatby, $obj->sellby, $obj->batch); // Price is set to 0, because we don't want to see WAP changed - - } } else @@ -1327,7 +1317,7 @@ class Reception extends CommonObject /** * Fetch all deliveries method and return an array. Load array this->listmeths. * - * @param id $id only this carrier, all if none + * @param int $id only this carrier, all if none * @return void */ function list_delivery_methods($id='') @@ -1393,7 +1383,7 @@ class Reception extends CommonObject /** * Activate delivery method. * - * @param id $id id method to activate + * @param int $id id method to activate * * @return void */ @@ -1411,7 +1401,7 @@ class Reception extends CommonObject /** * DesActivate delivery method. * - * @param id $id id method to desactivate + * @param int $id id method to desactivate * * @return void */ diff --git a/htdocs/reception/class/receptionstats.class.php b/htdocs/reception/class/receptionstats.class.php index 17985eccc70..3f60a9846fb 100644 --- a/htdocs/reception/class/receptionstats.class.php +++ b/htdocs/reception/class/receptionstats.class.php @@ -134,7 +134,7 @@ class ReceptionStats extends Stats if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; $sql.= " GROUP BY year"; - $sql.= $this->db->order('year','DESC'); + $sql.= $this->db->order('year','DESC'); return $this->_getAllByYear($sql); }