Qual: Normalize code
This commit is contained in:
parent
13fadd0e3c
commit
760a4d02b9
@ -11,7 +11,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Check Variable Naming -->
|
<!-- Check Variable Naming -->
|
||||||
<test name="variableNaming" regexp="/^[a-z_][a-zA-Z0-9]*$/" />
|
<test name="variableNaming" regexp="/^[a-z_][a-zA-Z0-9_]*$/" />
|
||||||
|
|
||||||
<!-- Check Function Naming -->
|
<!-- Check Function Naming -->
|
||||||
<test name="functionNaming" regexp="/^[a-z_]/" level="ERROR"/>
|
<test name="functionNaming" regexp="/^[a-z_]/" level="ERROR"/>
|
||||||
|
|||||||
@ -117,7 +117,7 @@ class RemiseCheque extends CommonObject
|
|||||||
* \param account_id Compte bancaire concerne
|
* \param account_id Compte bancaire concerne
|
||||||
* \return int <0 if KO, >0 if OK
|
* \return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function Create($user, $account_id)
|
function create($user, $account_id)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ class RemiseCheque extends CommonObject
|
|||||||
|
|
||||||
if ($this->id > 0 && $this->errno == 0)
|
if ($this->id > 0 && $this->errno == 0)
|
||||||
{
|
{
|
||||||
if ($this->UpdateAmount() <> 0)
|
if ($this->updateAmount() <> 0)
|
||||||
{
|
{
|
||||||
$this->errno = -1027;
|
$this->errno = -1027;
|
||||||
dol_syslog("RemiseCheque::Create ERREUR ($this->errno)");
|
dol_syslog("RemiseCheque::Create ERREUR ($this->errno)");
|
||||||
@ -254,7 +254,7 @@ class RemiseCheque extends CommonObject
|
|||||||
\brief Supprime la remise en base
|
\brief Supprime la remise en base
|
||||||
\param user utilisateur qui effectue l'operation
|
\param user utilisateur qui effectue l'operation
|
||||||
*/
|
*/
|
||||||
function Delete($user='')
|
function delete($user='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -308,7 +308,7 @@ class RemiseCheque extends CommonObject
|
|||||||
* \brief Validate receipt
|
* \brief Validate receipt
|
||||||
* \param user User
|
* \param user User
|
||||||
*/
|
*/
|
||||||
function Validate($user)
|
function validate($user)
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
|
|
||||||
@ -530,7 +530,7 @@ class RemiseCheque extends CommonObject
|
|||||||
* \brief Mets a jour le montant total
|
* \brief Mets a jour le montant total
|
||||||
* \return int, 0 en cas de succes
|
* \return int, 0 en cas de succes
|
||||||
*/
|
*/
|
||||||
function UpdateAmount()
|
function updateAmount()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -563,13 +563,13 @@ class RemiseCheque extends CommonObject
|
|||||||
if (!$resql)
|
if (!$resql)
|
||||||
{
|
{
|
||||||
$this->errno = -1030;
|
$this->errno = -1030;
|
||||||
dol_syslog("RemiseCheque::UpdateAmount ERREUR UPDATE ($this->errno)");
|
dol_syslog("RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->errno = -1031;
|
$this->errno = -1031;
|
||||||
dol_syslog("RemiseCheque::UpdateAmount ERREUR SELECT ($this->errno)");
|
dol_syslog("RemiseCheque::updateAmount ERREUR SELECT ($this->errno)");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->errno === 0)
|
if ($this->errno === 0)
|
||||||
@ -579,7 +579,7 @@ class RemiseCheque extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
dol_syslog("RemiseCheque::UpdateAmount ROLLBACK ($this->errno)");
|
dol_syslog("RemiseCheque::updateAmount ROLLBACK ($this->errno)");
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->errno;
|
return $this->errno;
|
||||||
@ -590,7 +590,7 @@ class RemiseCheque extends CommonObject
|
|||||||
\param user utilisateur qui effectue l'operation
|
\param user utilisateur qui effectue l'operation
|
||||||
\param account_id Compte bancaire concerne
|
\param account_id Compte bancaire concerne
|
||||||
*/
|
*/
|
||||||
function RemoveCheck($account_id)
|
function removeCheck($account_id)
|
||||||
{
|
{
|
||||||
$this->errno = 0;
|
$this->errno = 0;
|
||||||
|
|
||||||
@ -604,12 +604,12 @@ class RemiseCheque extends CommonObject
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$this->UpdateAmount();
|
$this->updateAmount();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->errno = -1032;
|
$this->errno = -1032;
|
||||||
dol_syslog("RemiseCheque::RemoveCheck ERREUR UPDATE ($this->errno)");
|
dol_syslog("RemiseCheque::removeCheck ERREUR UPDATE ($this->errno)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -688,10 +688,10 @@ class RemiseCheque extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoi le libelle d'un statut donne
|
* Return label of a status
|
||||||
* \param status Statut
|
* @param status Statut
|
||||||
* \param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
* @param mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||||
* \return string Libelle du statut
|
* @return string Libelle du statut
|
||||||
*/
|
*/
|
||||||
function LibStatut($status,$mode=0)
|
function LibStatut($status,$mode=0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/ecm/class/ecm_directories.class.php
|
* \file htdocs/ecm/class/ecmdirectories.class.php
|
||||||
* \ingroup ecm
|
* \ingroup ecm
|
||||||
* \brief This file is an example for a class file
|
* \brief This file is an example for a class file
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/exports/class/xport.class.php
|
* \file htdocs/exports/class/export.class.php
|
||||||
* \ingroup export
|
* \ingroup export
|
||||||
* \brief Fichier de la classe des exports
|
* \brief Fichier de la classe des exports
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/import/class/import.class.php
|
* \file htdocs/imports/class/import.class.php
|
||||||
* \ingroup import
|
* \ingroup import
|
||||||
* \brief File of class to manage imports
|
* \brief File of class to manage imports
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/includes/modules/facture/mercure.modules.php
|
* \file htdocs/includes/modules/facture/mod_facture_mercure.php
|
||||||
* \ingroup facture
|
* \ingroup facture
|
||||||
* \brief File containing class for numbering module Mercure
|
* \brief File containing class for numbering module Mercure
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/includes/modules/facture/terre.modules.php
|
* \file htdocs/includes/modules/facture/mod_facture_terre.php
|
||||||
* \ingroup facture
|
* \ingroup facture
|
||||||
* \brief File containing class for numbering module Terre
|
* \brief File containing class for numbering module Terre
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/includes/modules/members/cards/modules_cards.php
|
* \file htdocs/includes/modules/member/cards/modules_cards.php
|
||||||
* \ingroup member
|
* \ingroup member
|
||||||
* \brief File of parent class of document generator for members cards.
|
* \brief File of parent class of document generator for members cards.
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
|
|||||||
@ -775,10 +775,14 @@ class CMailFile
|
|||||||
return $_retVal;
|
return $_retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function has been modified as provided
|
/**
|
||||||
// by SirSir to allow multiline responses when
|
* This function has been modified as provided
|
||||||
// using SMTP Extensions.
|
* by SirSir to allow multiline responses when
|
||||||
//
|
* using SMTP Extensions.
|
||||||
|
* @param socket
|
||||||
|
* @param response
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
function server_parse($socket, $response)
|
function server_parse($socket, $response)
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user