Merge pull request #9387 from frederic34/camelCaps2

start changing phpcs:ignore
This commit is contained in:
Laurent Destailleur
2018-09-12 21:14:34 +02:00
committed by GitHub
266 changed files with 2943 additions and 1873 deletions

View File

@@ -164,6 +164,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
return $texte;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
*
@@ -175,9 +176,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc
* @param int $hideref Do not show ref
* @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)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager;
if (empty($srctemplatepath))

View File

@@ -216,14 +216,15 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Check if mask/numbering use prefix
*
* @return int 0 or 1
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_prefixIsUsed()
{
// phpcs:enable
global $conf;
$mask = $conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER;
@@ -292,6 +293,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Renvoi si un code est pris ou non (par autre tiers)
*
@@ -301,9 +303,9 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if available, <0 if KO
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_dispo($db, $code, $soc, $type=0)
{
// phpcs:enable
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe";
if ($type == 1) $sql.= " WHERE code_fournisseur = '".$code."'";
else $sql.= " WHERE code_client = '".$code."'";

View File

@@ -210,6 +210,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Renvoi si un code est pris ou non (par autre tiers)
*
@@ -219,9 +220,9 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if available, <0 if KO
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_dispo($db, $code, $soc, $type=0)
{
// phpcs:enable
global $conf, $mc;
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe";
@@ -250,15 +251,16 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Renvoi si un code respecte la syntaxe
*
* @param string $code Code a verifier
* @return int 0 si OK, <0 si KO
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_syntax($code)
{
// phpcs:enable
$res = 0;
if (dol_strlen($code) < 11)

View File

@@ -107,6 +107,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Set accountancy account code for a third party into this->code
*
@@ -115,9 +116,9 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
* @param string $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_code($db, $societe, $type='')
{
// phpcs:enable
global $conf;
$i = 0;

View File

@@ -67,6 +67,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
return '';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Set accountancy account code for a third party into this->code
*
@@ -75,9 +76,9 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
* @param int $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_code($db, $societe, $type='')
{
// phpcs:enable
$this->code='';
if (is_object($societe)) {

View File

@@ -38,23 +38,24 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
*/
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Return list of active generation modules
*
* @param DoliDB $db Database handler
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
// phpcs:enable
global $conf;
$type='company';
$liste=array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$liste=getListOfModels($db,$type,$maxfilenamelength);
$liste = getListOfModels($db,$type,$maxfilenamelength);
return $liste;
}
@@ -67,7 +68,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
abstract class ModeleThirdPartyCode
{
/**
* @var string Error code (or message)
* @var string Error code (or message)
*/
public $error='';
@@ -144,6 +145,7 @@ abstract class ModeleThirdPartyCode
return $langs->trans("NotAvailable");
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Renvoie la liste des modeles de numérotation
*
@@ -151,9 +153,9 @@ abstract class ModeleThirdPartyCode
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
// phpcs:enable
$liste=array();
$sql ="";
@@ -177,12 +179,12 @@ abstract class ModeleThirdPartyCode
}
/**
* Return description of module parameters
* Return description of module parameters
*
* @param Translate $langs Output language
* @param Societe $soc Third party object
* @param int $type -1=Nothing, 0=Customer, 1=Supplier
* @return string HTML translated description
* @param Translate $langs Output language
* @param Societe $soc Third party object
* @param int $type -1=Nothing, 0=Customer, 1=Supplier
* @return string HTML translated description
*/
function getToolTip($langs,$soc,$type)
{
@@ -243,14 +245,15 @@ abstract class ModeleThirdPartyCode
return $s;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Check if mask/numbering use prefix
*
* @return int 0=no, 1=yes
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_prefixIsUsed()
{
// phpcs:enable
return 0;
}
}
@@ -355,6 +358,7 @@ abstract class ModeleAccountancyCode
return $s;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Set accountancy account code for a third party into this->code
*
@@ -363,10 +367,10 @@ abstract class ModeleAccountancyCode
* @param int $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_code($db, $societe, $type='')
{
global $langs;
// phpcs:enable
global $langs;
return $langs->trans("NotAvailable");
}
@@ -374,6 +378,7 @@ abstract class ModeleAccountancyCode
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Create a document onto disk according to template module.
*
@@ -389,9 +394,9 @@ abstract class ModeleAccountancyCode
* @deprecated Use the new function generateDocument of Facture class
* @see Societe::generateDocument()
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function thirdparty_doc_create(DoliDB $db, Societe $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{
// phpcs:enable
dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);