move phpcs:ignore

This commit is contained in:
Frédéric FRANCE 2018-09-02 23:25:10 +02:00
parent 47e73bfd8e
commit 489074af5c
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
5 changed files with 95 additions and 80 deletions

View File

@ -149,6 +149,7 @@ class pdf_stdmovement extends ModelePDFMovement
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Function to build a document on disk using the generic odt module. * Function to build a document on disk using the generic odt module.
* *
@ -160,9 +161,9 @@ class pdf_stdmovement extends ModelePDFMovement
* @param int $hideref Do not show ref * @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO * @return int 1 if OK, <=0 if KO
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{ {
// phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager; global $user,$langs,$conf,$mysoc,$db,$hookmanager;
if (! is_object($outputlangs)) $outputlangs=$langs; if (! is_object($outputlangs)) $outputlangs=$langs;

View File

@ -28,6 +28,7 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator
public $error=''; public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of active generation models * Return list of active generation models
* *
@ -35,9 +36,9 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show * @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers * @return array List of numbers
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0) static function liste_modeles($db,$maxfilenamelength=0)
{ {
// phpcs:enable
global $conf; global $conf;
$type='supplier_payment'; $type='supplier_payment';

View File

@ -101,14 +101,15 @@ class Fichinter extends CommonObject
$this->products = array(); $this->products = array();
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load indicators into this->nb for board * Load indicators into this->nb for board
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
// phpcs:enable
global $user; global $user;
$this->nb=array(); $this->nb=array();
@ -630,6 +631,7 @@ class Fichinter extends CommonObject
return $this->LibStatut($this->statut,$mode); return $this->LibStatut($this->statut,$mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Returns the label of a statut * Returns the label of a statut
* *
@ -637,9 +639,9 @@ class Fichinter extends CommonObject
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
// phpcs:enable
// Init/load array of translation of status // Init/load array of translation of status
if (empty($this->statuts) || empty($this->statuts_short)) if (empty($this->statuts) || empty($this->statuts_short))
{ {
@ -662,17 +664,17 @@ class Fichinter extends CommonObject
if ($mode == 0) if ($mode == 0)
return $this->statuts[$statut]; return $this->statuts[$statut];
if ($mode == 1) elseif ($mode == 1)
return $this->statuts_short[$statut]; return $this->statuts_short[$statut];
if ($mode == 2) elseif ($mode == 2)
return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]).' '.$this->statuts_short[$statut]; return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]).' '.$this->statuts_short[$statut];
if ($mode == 3) elseif ($mode == 3)
return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]); return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]);
if ($mode == 4) elseif ($mode == 4)
return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]).' '.$this->statuts[$statut]; return img_picto($this->statuts_short[$statut], $this->statuts_logo[$statut]).' '.$this->statuts[$statut];
if ($mode == 5) elseif ($mode == 5)
return '<span class="hideonsmartphone">'.$this->statuts_short[$statut].' </span>'.img_picto($this->statuts[$statut],$this->statuts_logo[$statut]); return '<span class="hideonsmartphone">'.$this->statuts_short[$statut].' </span>'.img_picto($this->statuts[$statut],$this->statuts_logo[$statut]);
if ($mode == 6) elseif ($mode == 6)
return '<span class="hideonsmartphone">'.$this->statuts[$statut].' </span>'.img_picto($this->statuts[$statut],$this->statuts_logo[$statut]); return '<span class="hideonsmartphone">'.$this->statuts[$statut].' </span>'.img_picto($this->statuts[$statut],$this->statuts_logo[$statut]);
return ''; return '';
@ -973,6 +975,7 @@ class Fichinter extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Defines a delivery date of intervention * Defines a delivery date of intervention
* *
@ -980,9 +983,9 @@ class Fichinter extends CommonObject
* @param date $date_delivery date of delivery * @param date $date_delivery date of delivery
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_delivery($user, $date_delivery) function set_date_delivery($user, $date_delivery)
{ {
// phpcs:enable
global $conf; global $conf;
if ($user->rights->ficheinter->creer) if ($user->rights->ficheinter->creer)
@ -1006,6 +1009,7 @@ class Fichinter extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Define the label of the intervention * Define the label of the intervention
* *
@ -1013,9 +1017,9 @@ class Fichinter extends CommonObject
* @param string $description description * @param string $description description
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_description($user, $description) function set_description($user, $description)
{ {
// phpcs:enable
global $conf; global $conf;
if ($user->rights->ficheinter->creer) if ($user->rights->ficheinter->creer)
@ -1040,6 +1044,7 @@ class Fichinter extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Link intervention to a contract * Link intervention to a contract
* *
@ -1047,9 +1052,9 @@ class Fichinter extends CommonObject
* @param int $contractid Description * @param int $contractid Description
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_contrat($user, $contractid) function set_contrat($user, $contractid)
{ {
// phpcs:enable
global $conf; global $conf;
if ($user->rights->ficheinter->creer) if ($user->rights->ficheinter->creer)
@ -1249,14 +1254,15 @@ class Fichinter extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load array lines ->lines * Load array lines ->lines
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines() function fetch_lines()
{ {
// phpcs:enable
$this->lines = array(); $this->lines = array();
$sql = 'SELECT rowid, description, duree, date, rang'; $sql = 'SELECT rowid, description, duree, date, rang';
@ -1561,14 +1567,15 @@ class FichinterLigne extends CommonObjectLine
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Update total duration into llx_fichinter * Update total duration into llx_fichinter
* *
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total() function update_total()
{ {
// phpcs:enable
global $conf; global $conf;
$this->db->begin(); $this->db->begin();

View File

@ -221,6 +221,7 @@ class Livraison extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Create a line * Create a line
* *
@ -230,9 +231,9 @@ class Livraison extends CommonObject
* @param string $description Description * @param string $description Description
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_line($origin_id, $qty, $fk_product, $description) function create_line($origin_id, $qty, $fk_product, $description)
{ {
// phpcs:enable
$error = 0; $error = 0;
$idprod = $fk_product; $idprod = $fk_product;
$j = 0; $j = 0;
@ -493,6 +494,7 @@ class Livraison extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Cree le bon de livraison depuis une expedition existante * Cree le bon de livraison depuis une expedition existante
* *
@ -500,9 +502,9 @@ class Livraison extends CommonObject
* @param int $sending_id Id de l'expedition qui sert de modele * @param int $sending_id Id de l'expedition qui sert de modele
* @return integer * @return integer
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_from_sending($user, $sending_id) function create_from_sending($user, $sending_id)
{ {
// phpcs:enable
$expedition = new Expedition($this->db); $expedition = new Expedition($this->db);
$result=$expedition->fetch($sending_id); $result=$expedition->fetch($sending_id);
@ -539,6 +541,7 @@ class Livraison extends CommonObject
return $this->create($user); return $this->create($user);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Update a livraison line (only extrafields) * Update a livraison line (only extrafields)
* *
@ -546,9 +549,9 @@ class Livraison extends CommonObject
* @param array $array_options extrafields array * @param array $array_options extrafields array
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_line($id, $array_options=0) function update_line($id, $array_options=0)
{ {
// phpcs:enable
global $conf; global $conf;
$error = 0; $error = 0;
@ -737,14 +740,15 @@ class Livraison extends CommonObject
return $result; return $result;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load lines * Load lines
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines() function fetch_lines()
{ {
// phpcs:enable
$this->lines = array(); $this->lines = array();
$sql = "SELECT ld.rowid, ld.fk_product, ld.description, ld.subprice, ld.total_ht, ld.qty as qty_shipped, ld.fk_origin_line, "; $sql = "SELECT ld.rowid, ld.fk_product, ld.description, ld.subprice, ld.total_ht, ld.qty as qty_shipped, ld.fk_origin_line, ";
@ -807,6 +811,7 @@ class Livraison extends CommonObject
return $this->LibStatut($this->statut,$mode); return $this->LibStatut($this->statut,$mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Renvoi le libelle d'un statut donne * Renvoi le libelle d'un statut donne
* *
@ -814,34 +819,34 @@ class Livraison extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode) function LibStatut($statut,$mode)
{ {
// phpcs:enable
global $langs; global $langs;
if ($mode==0) if ($mode==0)
{ {
if ($statut==-1) return $langs->trans('StatusDeliveryCanceled'); if ($statut==-1) return $langs->trans('StatusDeliveryCanceled');
if ($statut==0) return $langs->trans('StatusDeliveryDraft'); elseif ($statut==0) return $langs->trans('StatusDeliveryDraft');
if ($statut==1) return $langs->trans('StatusDeliveryValidated'); elseif ($statut==1) return $langs->trans('StatusDeliveryValidated');
} }
if ($mode==1) elseif ($mode==1)
{ {
if ($statut==-1) return $langs->trans($this->statuts[$statut]); if ($statut==-1) return $langs->trans($this->statuts[$statut]);
if ($statut==0) return $langs->trans($this->statuts[$statut]); elseif ($statut==0) return $langs->trans($this->statuts[$statut]);
if ($statut==1) return $langs->trans($this->statuts[$statut]); elseif ($statut==1) return $langs->trans($this->statuts[$statut]);
} }
if ($mode == 4) elseif ($mode == 4)
{ {
if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'),'statut5').' '.$langs->trans('StatusDeliveryCanceled'); if ($statut==-1) return img_picto($langs->trans('StatusDeliveryCanceled'),'statut5').' '.$langs->trans('StatusDeliveryCanceled');
if ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'),'statut0').' '.$langs->trans('StatusDeliveryDraft'); elseif ($statut==0) return img_picto($langs->trans('StatusDeliveryDraft'),'statut0').' '.$langs->trans('StatusDeliveryDraft');
if ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'),'statut4').' '.$langs->trans('StatusDeliveryValidated'); elseif ($statut==1) return img_picto($langs->trans('StatusDeliveryValidated'),'statut4').' '.$langs->trans('StatusDeliveryValidated');
} }
if ($mode == 6) elseif ($mode == 6)
{ {
if ($statut==-1) return $langs->trans('StatusDeliveryCanceled').' '.img_picto($langs->trans('StatusDeliveryCanceled'),'statut5'); if ($statut==-1) return $langs->trans('StatusDeliveryCanceled').' '.img_picto($langs->trans('StatusDeliveryCanceled'),'statut5');
if ($statut==0) return $langs->trans('StatusDeliveryDraft').' '.img_picto($langs->trans('StatusDeliveryDraft'),'statut0'); elseif ($statut==0) return $langs->trans('StatusDeliveryDraft').' '.img_picto($langs->trans('StatusDeliveryDraft'),'statut0');
if ($statut==1) return $langs->trans('StatusDeliveryValidated').' '.img_picto($langs->trans('StatusDeliveryValidated'),'statut4'); elseif ($statut==1) return $langs->trans('StatusDeliveryValidated').' '.img_picto($langs->trans('StatusDeliveryValidated'),'statut4');
} }
} }
@ -979,6 +984,7 @@ class Livraison extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Set the planned delivery date * Set the planned delivery date
* *
@ -986,9 +992,9 @@ class Livraison extends CommonObject
* @param timestamp $date_livraison Date de livraison * @param timestamp $date_livraison Date de livraison
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison) function set_date_livraison($user, $date_livraison)
{ {
// phpcs:enable
if ($user->rights->expedition->creer) if ($user->rights->expedition->creer)
{ {
$sql = "UPDATE ".MAIN_DB_PREFIX."livraison"; $sql = "UPDATE ".MAIN_DB_PREFIX."livraison";

View File

@ -216,8 +216,6 @@ class Ticket extends CommonObject
const STATUS_CANCELED = 9; const STATUS_CANCELED = 9;
/** /**
* Constructor * Constructor
* *
@ -1169,6 +1167,7 @@ class Ticket extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return status label of object * Return status label of object
* *
@ -1176,146 +1175,146 @@ class Ticket extends CommonObject
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut, $mode = 0) function LibStatut($statut, $mode = 0)
{ {
// phpcs:enable
global $langs; global $langs;
if ($mode == 0) { if ($mode == 0) {
return $langs->trans($this->statuts[$statut]); return $langs->trans($this->statuts[$statut]);
} }
if ($mode == 1) { elseif ($mode == 1) {
return $langs->trans($this->statuts_short[$statut]); return $langs->trans($this->statuts_short[$statut]);
} }
if ($mode == 2) { elseif ($mode == 2) {
if ($statut == 0) { if ($statut == 0) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 1) { elseif ($statut == 1) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 3) { elseif ($statut == 3) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 4) { elseif ($statut == 4) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 5) { elseif ($statut == 5) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 6) { elseif ($statut == 6) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 8) { elseif ($statut == 8) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 9) { elseif ($statut == 9) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
} }
if ($mode == 3) { elseif ($mode == 3) {
if ($statut == 0) { if ($statut == 0) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket'); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket');
} }
if ($statut == 1) { elseif ($statut == 1) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket'); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket');
} }
if ($statut == 3) { elseif ($statut == 3) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket'); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket');
} }
if ($statut == 4) { elseif ($statut == 4) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4.png@ticket'); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4.png@ticket');
} }
if ($statut == 5) { elseif ($statut == 5) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket'); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket');
} }
if ($statut == 6) { elseif ($statut == 6) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket'); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket');
} }
if ($statut == 8) { elseif ($statut == 8) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket'); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket');
} }
if ($statut == 9) { elseif ($statut == 9) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket'); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket');
} }
} }
if ($mode == 4) { elseif ($mode == 4) {
if ($statut == 0) { if ($statut == 0) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 1) { elseif ($statut == 1) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 3) { elseif ($statut == 3) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 4) { elseif ($statut == 4) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut4.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 5) { elseif ($statut == 5) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 6) { elseif ($statut == 6) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 8) { elseif ($statut == 8) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
if ($statut == 9) { elseif ($statut == 9) {
return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]); return img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket') . ' ' . $langs->trans($this->statuts_short[$statut]);
} }
} }
if ($mode == 5) { elseif ($mode == 5) {
if ($statut == 0) { if ($statut == 0) {
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket'); return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut0.png@ticket');
} }
if ($statut == 1) { elseif ($statut == 1) {
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket'); return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut1.png@ticket');
} }
if ($statut == 3) { elseif ($statut == 3) {
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket'); return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut3.png@ticket');
} }
if ($statut == 4) { elseif ($statut == 4) {
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut4.png@ticket'); return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut4.png@ticket');
} }
if ($statut == 5) { elseif ($statut == 5) {
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket'); return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut5.png@ticket');
} }
if ($statut == 6) { elseif ($statut == 6) {
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket'); return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut6.png@ticket');
} }
if ($statut == 8) { elseif ($statut == 8) {
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket'); return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut8.png@ticket');
} }
if ($statut == 9) { elseif ($statut == 9) {
return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket'); return $langs->trans($this->statuts_short[$statut]) . ' ' . img_picto($langs->trans($this->statuts_short[$statut]), 'statut9.png@ticket');
} }
} }
@ -2447,15 +2446,16 @@ class Ticket extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return if at least one photo is available * Return if at least one photo is available
* *
* @param string $sdir Directory to scan * @param string $sdir Directory to scan
* @return boolean True if at least one photo is available, False if not * @return boolean True if at least one photo is available, False if not
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_photo_available($sdir) function is_photo_available($sdir)
{ {
// phpcs:enable
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
global $conf; global $conf;