add visibility

This commit is contained in:
Frédéric FRANCE 2019-02-28 22:07:48 +01:00
parent 4f9e35f350
commit 7e31ca48d8
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
46 changed files with 387 additions and 379 deletions

View File

@ -299,7 +299,7 @@ class Orders extends DolibarrApi
if ($updateRes > 0) {
return $updateRes;
} else {
throw new RestException(400, $this->commande->error);
throw new RestException(400, $this->commande->error);
}
}

View File

@ -33,7 +33,7 @@ abstract class ModeleAction extends CommonDocGenerator
*/
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -41,7 +41,7 @@ abstract class ModeleAction extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db, $maxfilenamelength = 0)
public static function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;

View File

@ -71,7 +71,7 @@ class CommActionRapport
* @param int $month Month
* @param int $year Year
*/
function __construct($db, $month, $year)
public function __construct($db, $month, $year)
{
global $conf, $langs;
@ -99,16 +99,16 @@ class CommActionRapport
$this->subject=$langs->transnoentitiesnoconv("ActionsReport").' '.$this->year."-".$this->month;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Write the object to document file to disk
*
* @param int $socid Thirdparty id
* @param int $catid Cat id
* @param Translate $outputlangs Lang object for output language
* @return int 1=OK, 0=KO
*/
function write_file($socid = 0, $catid = 0, $outputlangs = '')
*/
public function write_file($socid = 0, $catid = 0, $outputlangs = '')
{
// phpcs:enable
global $user,$conf,$langs,$hookmanager;
@ -210,7 +210,7 @@ class CommActionRapport
* @param Translate $outputlangs Object langs
* @return int 1
*/
function _pages(&$pdf, $outputlangs)
private function _pages(&$pdf, $outputlangs)
{
global $conf;
@ -335,7 +335,7 @@ class CommActionRapport
* @param int $pagenb Page nb
* @return integer
*/
function _pagehead(&$pdf, $outputlangs, $pagenb)
private function _pagehead(&$pdf, $outputlangs, $pagenb)
{
global $conf,$langs;

View File

@ -45,7 +45,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@ -78,7 +78,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$this->tab_height = 200; //$this->line_height * $this->line_per_page;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Fonction to generate document on disk
*
@ -88,7 +88,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param Translate $outputlangs Lang output object
* @return int 1=ok, 0=ko
*/
function write_file($object, $_dir, $number, $outputlangs)
public function write_file($object, $_dir, $number, $outputlangs)
{
// phpcs:enable
global $user,$conf,$langs,$hookmanager;
@ -209,7 +209,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Generate Header
*
@ -219,7 +219,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param Translate $outputlangs Object language for output
* @return void
*/
function Header(&$pdf, $page, $pages, $outputlangs)
public function Header(&$pdf, $page, $pages, $outputlangs)
{
// phpcs:enable
global $langs;
@ -317,7 +317,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Output array
*
@ -327,7 +327,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param Translate $outputlangs Object lang
* @return void
*/
function Body(&$pdf, $pagenb, $pages, $outputlangs)
public function Body(&$pdf, $pagenb, $pages, $outputlangs)
{
// phpcs:enable
// x=10 - Num
@ -378,15 +378,15 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
/**
* Show footer of page. Need this->emetteur object
* Show footer of page. Need this->emetteur object
*
* @param PDF $pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return void
* @param PDF $pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return void
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$default_font_size = pdf_getPDFFontSize($outputlangs);

View File

@ -203,7 +203,7 @@ class pdf_einstein extends ModelePDFCommandes
$this->atleastonediscount=0;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@ -215,7 +215,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes;
@ -652,7 +652,7 @@ class pdf_einstein extends ModelePDFCommandes
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show payments table
*
@ -662,13 +662,13 @@ class pdf_einstein extends ModelePDFCommandes
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
private function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
// phpcs:enable
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show miscellaneous information (payment mode, payment term, ...)
*
@ -678,7 +678,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
private function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
// phpcs:enable
global $conf;
@ -855,18 +855,18 @@ class pdf_einstein extends ModelePDFCommandes
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show total to pay
*
* @param TCPDF $pdf Object PDF
* @param TCPDF $pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
private function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
// phpcs:enable
global $conf,$mysoc;
@ -1129,7 +1129,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param string $currency Currency code
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
{
global $conf;
@ -1239,7 +1239,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param string $titlekey Translation key to show as title of document
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle")
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle")
{
global $conf,$langs,$hookmanager;
@ -1450,7 +1450,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;

View File

@ -643,7 +643,7 @@ class pdf_eratosthene extends ModelePDFCommandes
if ($pagenb == $pageposafter)
{
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code);
}
}
else
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code);
@ -816,7 +816,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->MultiCell(80, 4, $dlp, 0, 'L');
$posy=$pdf->GetY()+1;
}
}
elseif ($object->availability_code || $object->availability) // Show availability conditions
{
$pdf->SetFont('', 'B', $default_font_size - 2);
@ -831,7 +831,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
$posy=$pdf->GetY()+1;
}
}
// Show payment mode
if ($object->mode_reglement_code
@ -889,8 +889,8 @@ class pdf_eratosthene extends ModelePDFCommandes
$posy=$pdf->GetY()+2;
}
}
}
}
}
}
// If payment mode not forced or forced to VIR, show payment with BAN
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR')
@ -1672,5 +1672,5 @@ class pdf_eratosthene extends ModelePDFCommandes
{
$this->cols = $hookmanager->resArray;
}
}
}
}

View File

@ -46,7 +46,7 @@ class pdf_proforma extends pdf_einstein
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@ -67,7 +67,7 @@ class pdf_proforma extends pdf_einstein
* @param string $titlekey Translation key to show as title of document
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma")
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma")
{
global $conf,$langs,$hookmanager;

View File

@ -25,13 +25,13 @@ include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
*/
class mailing_advthirdparties extends MailingTargets
{
var $name='ThirdPartyAdvancedTargeting';
public $name='ThirdPartyAdvancedTargeting';
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
var $desc="Third parties";
var $require_admin=0;
public $desc="Third parties";
public $require_admin=0;
var $require_module=array("none"); // This module should not be displayed as Selector in mailling
var $picto='company';
public $require_module=array("none"); // This module should not be displayed as Selector in mailling
public $picto='company';
/**
* @var DoliDB Database handler.
@ -44,13 +44,13 @@ class mailing_advthirdparties extends MailingTargets
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
$this->db=$db;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* This is the main function that returns the array of emails
*
@ -60,7 +60,7 @@ class mailing_advthirdparties extends MailingTargets
* @param array $contactid Array of contact id to add
* @return int <0 if error, number of emails added if ok
*/
function add_to_target_spec($mailing_id, $socid, $type_of_target, $contactid)
public function add_to_target_spec($mailing_id, $socid, $type_of_target, $contactid)
{
// phpcs:enable
global $conf, $langs;
@ -190,7 +190,7 @@ class mailing_advthirdparties extends MailingTargets
*
* @return array Array with SQL requests
*/
function getSqlArrayForStats()
public function getSqlArrayForStats()
{
// CHANGE THIS: Optionnal
@ -208,7 +208,7 @@ class mailing_advthirdparties extends MailingTargets
* @param string $sql Not use here
* @return int Nb of recipients
*/
function getNbOfRecipients($sql = '')
public function getNbOfRecipients($sql = '')
{
global $conf;
@ -228,7 +228,7 @@ class mailing_advthirdparties extends MailingTargets
*
* @return string A html select zone
*/
function formFilter()
public function formFilter()
{
global $conf, $langs;
@ -287,7 +287,7 @@ class mailing_advthirdparties extends MailingTargets
* @param string $type type
* @return string Url link
*/
function url($id, $type)
public function url($id, $type)
{
if ($type=='thirdparty') {
$companystatic=new Societe($this->db);

View File

@ -42,12 +42,12 @@ class pdf_standard extends CommonStickerGenerator
* @param array $param Associative array containing label content and optional parameters
* @return void
*/
function addSticker(&$pdf, $outputlangs, $param)
public function addSticker(&$pdf, $outputlangs, $param)
{
// use this method in future refactoring
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)
* - __LOGO__ is replace with company logo
@ -63,7 +63,7 @@ class pdf_standard extends CommonStickerGenerator
* @param string $photo Photo (full path to image file used as replacement for key __PHOTOS__ into left, right, header or footer text)
* @return void
*/
function Add_PDF_card(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $idmember = 0, $photo = '')
public function Add_PDF_card(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $idmember = 0, $photo = '')
{
// phpcs:enable
global $db,$mysoc,$conf,$langs;
@ -237,7 +237,7 @@ class pdf_standard extends CommonStickerGenerator
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build PDF on disk, then output on HTTP stream.
*
@ -248,7 +248,7 @@ class pdf_standard extends CommonStickerGenerator
* @param int $nooutput 1=Generate only file on disk and do not return it on response
* @return int 1=OK, 0=KO
*/
function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0)
public function write_file($object, $outputlangs, $srctemplatepath, $mode = 'member', $nooutput = 0)
{
// phpcs:enable
global $user,$conf,$langs,$mysoc,$_Avery_Labels;

View File

@ -40,7 +40,7 @@ class ModelePDFCards
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -48,7 +48,7 @@ class ModelePDFCards
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
function liste_modeles($db, $maxfilenamelength = 0)
public function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;

View File

@ -59,7 +59,7 @@ class mod_payment_ant extends ModeleNumRefPayments
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $db, $conf, $langs;
@ -99,7 +99,7 @@ class mod_payment_ant extends ModeleNumRefPayments
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $conf,$langs,$mysoc;
@ -122,7 +122,7 @@ class mod_payment_ant extends ModeleNumRefPayments
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
function getNextValue($objsoc, $object)
public function getNextValue($objsoc, $object)
{
global $db,$conf;
@ -143,7 +143,7 @@ class mod_payment_ant extends ModeleNumRefPayments
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next free value
*
@ -151,7 +151,7 @@ class mod_payment_ant extends ModeleNumRefPayments
* @param string $objforref Object for number to search
* @return string Next free value
*/
function commande_get_num($objsoc, $objforref)
public function commande_get_num($objsoc, $objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc, $objforref);

View File

@ -60,7 +60,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
*
* @return string Text with description
*/
function info()
public function info()
{
global $langs;
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
@ -72,7 +72,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
*
* @return string Example
*/
function getExample()
public function getExample()
{
return $this->prefix."0501-0001";
}
@ -84,7 +84,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
global $conf,$langs,$db;
@ -119,7 +119,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
function getNextValue($objsoc, $object)
public function getNextValue($objsoc, $object)
{
global $db,$conf;
@ -155,7 +155,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next free value
*
@ -163,7 +163,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
* @param string $objforref Object for number to search
* @return string Next free value
*/
function payment_get_num($objsoc, $objforref)
public function payment_get_num($objsoc, $objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc, $objforref);

View File

@ -33,7 +33,7 @@ abstract class ModeleNumRefPayments
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@ -43,7 +43,7 @@ abstract class ModeleNumRefPayments
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $langs;
$langs->load("bills");
@ -55,7 +55,7 @@ abstract class ModeleNumRefPayments
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $langs;
$langs->load("bills");
@ -67,7 +67,7 @@ abstract class ModeleNumRefPayments
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
return true;
}
@ -79,7 +79,7 @@ abstract class ModeleNumRefPayments
* @param Object $object Object we need next value for
* @return string Valeur
*/
function getNextValue($objsoc, $object)
public function getNextValue($objsoc, $object)
{
global $langs;
return $langs->trans("NotAvailable");
@ -90,15 +90,15 @@ abstract class ModeleNumRefPayments
*
* @return string Value
*/
function getVersion()
public function getVersion()
{
global $langs;
$langs->load("admin");
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
if ($this->version == 'dolibarr') return DOL_VERSION;
if ($this->version) return $this->version;
return $langs->trans("NotAvailable");
elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
elseif ($this->version == 'dolibarr') return DOL_VERSION;
elseif ($this->version) return $this->version;
else return $langs->trans("NotAvailable");
}
}

View File

@ -41,12 +41,12 @@ class pdf_standardlabel extends CommonStickerGenerator
* @param array $param Associative array containing label content and optional parameters
* @return void
*/
function addSticker(&$pdf, $outputlangs, $param)
public function addSticker(&$pdf, $outputlangs, $param)
{
// use this method in future refactoring
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)
* - %LOGO% is replace with company logo
@ -61,7 +61,7 @@ class pdf_standardlabel extends CommonStickerGenerator
* @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text)
* @return void
*/
function Add_PDF_label(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $photo = '')
public function Add_PDF_label(&$pdf, $textleft, $header, $footer, $outputlangs, $textright = '', $photo = '')
{
// phpcs:enable
global $mysoc, $conf, $langs;
@ -227,7 +227,7 @@ class pdf_standardlabel extends CommonStickerGenerator
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build PDF on disk, then output on HTTP strem.
*
@ -238,7 +238,7 @@ class pdf_standardlabel extends CommonStickerGenerator
* @param string $filename Short file name of PDF output file
* @return int 1=OK, 0=KO
*/
function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf')
public function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf')
{
// phpcs:enable
global $user,$conf,$langs,$mysoc,$_Avery_Labels;

View File

@ -96,7 +96,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
* @param array $param Associative array containing label content and optional parameters
* @return void
*/
function addSticker(&$pdf, $outputlangs, $param)
public function addSticker(&$pdf, $outputlangs, $param)
{
global $mysoc,$conf;
@ -266,7 +266,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build PDF on disk, then output on HTTP strem.
*
@ -277,7 +277,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
* @param string $filename Short file name of PDF output file
* @return int 1=OK, 0=KO
*/
function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf')
public function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '', $filename = 'tmp_address_sheet.pdf')
{
// phpcs:enable
global $user,$conf,$langs,$mysoc,$_Avery_Labels;

View File

@ -40,7 +40,7 @@ class ModelePDFLabels
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -48,7 +48,7 @@ class ModelePDFLabels
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
function liste_modeles($db, $maxfilenamelength = 0)
public function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;

View File

@ -853,7 +853,7 @@ class pdf_standard extends ModelePDFProduct
$pdf->SetFont('','', $default_font_size - 1);
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
*/
}
}
$pdf->SetTextColor(0, 0, 0);
}

View File

@ -297,7 +297,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoi si un code est pris ou non (par autre tiers)
*

View File

@ -39,7 +39,7 @@ abstract class ModelePDFProduct extends CommonDocGenerator
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -243,7 +243,7 @@ abstract class ModeleProductCode
return $s;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Check if mask/numbering use prefix
*

View File

@ -60,7 +60,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf, $langs, $mysoc;
@ -105,7 +105,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
* @param Translate $langs Lang object to use for output
* @return string Description
*/
function info($langs)
public function info($langs)
{
global $conf,$langs;
@ -219,7 +219,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
return $texte;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
*
@ -231,7 +231,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager;

View File

@ -125,7 +125,7 @@ class pdf_azur extends ModelePDFPropales
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@ -202,7 +202,7 @@ class pdf_azur extends ModelePDFPropales
$this->atleastonediscount=0;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@ -214,7 +214,7 @@ class pdf_azur extends ModelePDFPropales
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
@ -837,7 +837,7 @@ class pdf_azur extends ModelePDFPropales
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show payments table
*
@ -847,13 +847,13 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
private function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
// phpcs:enable
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show miscellaneous information (payment mode, payment term, ...)
*
@ -863,7 +863,7 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
private function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
// phpcs:enable
global $conf;
@ -1034,7 +1034,7 @@ class pdf_azur extends ModelePDFPropales
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show total to pay
*
@ -1045,7 +1045,7 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
private function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
// phpcs:enable
global $conf,$mysoc;
@ -1323,7 +1323,7 @@ class pdf_azur extends ModelePDFPropales
* @param string $currency Currency code
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
{
global $conf;
@ -1442,7 +1442,7 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
@ -1665,14 +1665,14 @@ class pdf_azur extends ModelePDFPropales
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show area for the customer to sign
*
@ -1682,7 +1682,7 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _signature_area(&$pdf, $object, $posy, $outputlangs)
private function _signature_area(&$pdf, $object, $posy, $outputlangs)
{
// phpcs:enable
global $conf;

View File

@ -903,7 +903,7 @@ class pdf_cyan extends ModelePDFPropales
* @param Translate $outputlangs Langs object
* @return void
*/
function drawInfoTable(&$pdf, $object, $posy, $outputlangs)
public function drawInfoTable(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
$default_font_size = pdf_getPDFFontSize($outputlangs);
@ -1360,7 +1360,7 @@ class pdf_cyan extends ModelePDFPropales
* @param string $currency Currency code
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
{
global $conf;
@ -1427,7 +1427,7 @@ class pdf_cyan extends ModelePDFPropales
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
@ -1652,7 +1652,7 @@ class pdf_cyan extends ModelePDFPropales
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
@ -1705,7 +1705,7 @@ class pdf_cyan extends ModelePDFPropales
* @param int $hideref Do not show ref
* @return null
*/
function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
global $conf, $hookmanager;

View File

@ -62,7 +62,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $conf, $langs;
@ -102,7 +102,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $conf,$langs,$mysoc;
@ -128,7 +128,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
* @param Propal $propal Object commercial proposal
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $propal)
public function getNextValue($objsoc, $propal)
{
global $db,$conf;

View File

@ -42,7 +42,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -50,7 +50,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db, $maxfilenamelength = 0)
public static function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;
@ -81,7 +81,7 @@ abstract class ModeleNumRefPropales
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@ -91,7 +91,7 @@ abstract class ModeleNumRefPropales
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $langs;
$langs->load("propale");
@ -103,7 +103,7 @@ abstract class ModeleNumRefPropales
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $langs;
$langs->load("propale");
@ -116,7 +116,7 @@ abstract class ModeleNumRefPropales
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
return true;
}
@ -128,7 +128,7 @@ abstract class ModeleNumRefPropales
* @param Propal $propal Object commercial proposal
* @return string Valeur
*/
function getNextValue($objsoc, $propal)
public function getNextValue($objsoc, $propal)
{
global $langs;
return $langs->trans("NotAvailable");
@ -139,7 +139,7 @@ abstract class ModeleNumRefPropales
*
* @return string Valeur
*/
function getVersion()
public function getVersion()
{
global $langs;
$langs->load("admin");

View File

@ -37,7 +37,7 @@ class pdf_paiement
*
* @param DoliDb $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $langs,$conf;
@ -93,7 +93,7 @@ class pdf_paiement
* @param string $outputlangs Lang output object
* @return int <0 if KO, >0 if OK
*/
function write_file($_dir, $month, $year, $outputlangs)
public function write_file($_dir, $month, $year, $outputlangs)
{
// phpcs:enable
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@ -340,6 +340,7 @@ class pdf_paiement
return 1;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/**
* Show top header of page.
*
@ -349,8 +350,9 @@ class pdf_paiement
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $page, $showaddress, $outputlangs)
protected function _pagehead(&$pdf, $page, $showaddress, $outputlangs)
{
// phpcs:enable
global $langs, $conf;
// Do not add the BACKGROUND as this is a report
@ -412,7 +414,7 @@ class pdf_paiement
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Output body
*
@ -422,7 +424,7 @@ class pdf_paiement
* @param Translate $outputlangs Object langs
* @return void
*/
function Body(&$pdf, $page, $lines, $outputlangs)
public function Body(&$pdf, $page, $lines, $outputlangs)
{
// phpcs:enable
global $langs;

View File

@ -35,7 +35,7 @@ class pdf_paiement_fourn extends pdf_paiement
*
* @param DoliDb $db Database handler
*/
function __construct($db)
public function __construct($db)
{
parent::__construct($db);
$this->doc_type = "fourn";

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/
class pdf_squille extends ModelePdfReception
{
var $emetteur; // Objet societe qui emet
public $emetteur; // Objet societe qui emet
/**
@ -40,7 +40,7 @@ class pdf_squille extends ModelePdfReception
*
* @param DoliDB $db Database handler
*/
function __construct($db = 0)
public function __construct($db = 0)
{
global $conf,$langs,$mysoc;
@ -98,7 +98,7 @@ class pdf_squille extends ModelePdfReception
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@ -110,7 +110,7 @@ class pdf_squille extends ModelePdfReception
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user,$conf,$langs,$hookmanager;
@ -592,7 +592,7 @@ class pdf_squille extends ModelePdfReception
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show total to pay
*
@ -604,7 +604,7 @@ class pdf_squille extends ModelePdfReception
* @param int $totalOrdered Total ordered
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs, $totalOrdered)
private function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs, $totalOrdered)
{
// phpcs:enable
global $conf,$mysoc;
@ -707,7 +707,7 @@ class pdf_squille extends ModelePdfReception
* @param int $hidebottom Hide bottom bar of array
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
{
global $conf;
@ -786,7 +786,7 @@ class pdf_squille extends ModelePdfReception
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs,$mysoc;
@ -1037,7 +1037,7 @@ class pdf_squille extends ModelePdfReception
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;

View File

@ -28,10 +28,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/reception/modules_reception.php';
*/
class mod_reception_beryl extends ModelNumRefReception
{
var $version='dolibarr';
var $prefix='RCP';
var $error='';
var $nom='Beryl';
public $version='dolibarr';
public $prefix='RCP';
public $error='';
public $nom='Beryl';
/**
@ -39,7 +39,7 @@ class mod_reception_beryl extends ModelNumRefReception
*
* @return string text description
*/
function info()
public function info()
{
global $langs;
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
@ -51,7 +51,7 @@ class mod_reception_beryl extends ModelNumRefReception
*
* @return string Example
*/
function getExample()
public function getExample()
{
return $this->prefix."0501-0001";
}
@ -62,7 +62,7 @@ class mod_reception_beryl extends ModelNumRefReception
*
* @return boolean false if conflit, true if ok
*/
function canBeActivated()
public function canBeActivated()
{
global $conf,$langs,$db;
@ -97,7 +97,7 @@ class mod_reception_beryl extends ModelNumRefReception
* @param Object $shipment Shipment object
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $shipment)
public function getNextValue($objsoc, $shipment)
{
global $db,$conf;
@ -130,7 +130,7 @@ class mod_reception_beryl extends ModelNumRefReception
return $this->prefix.$yymm."-".$num;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next free value
*
@ -138,7 +138,7 @@ class mod_reception_beryl extends ModelNumRefReception
* @param Object $objforref Shipment object
* @return string Next free value
*/
function reception_get_num($objsoc, $objforref)
public function reception_get_num($objsoc, $objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc, $objforref);

View File

@ -29,16 +29,16 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/reception/modules_reception.php';
*/
class mod_reception_moonstone extends ModelNumRefReception
{
var $version='dolibarr';
var $error = '';
var $nom = 'Moonstone';
public $version='dolibarr';
public $error = '';
public $nom = 'Moonstone';
/**
* Return default description of numbering model
*
* @return string text description
*/
function info()
public function info()
{
global $conf,$langs;
@ -74,7 +74,7 @@ class mod_reception_moonstone extends ModelNumRefReception
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $conf,$langs,$mysoc;
@ -100,7 +100,7 @@ class mod_reception_moonstone extends ModelNumRefReception
* @param Object $reception Reception object
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $reception)
public function getNextValue($objsoc, $reception)
{
global $db,$conf;
@ -129,7 +129,7 @@ class mod_reception_moonstone extends ModelNumRefReception
* @param Object $objforref Reception object
* @return string Next free value
*/
function reception_get_num($objsoc, $objforref)
public function reception_get_num($objsoc, $objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc, $objforref);

View File

@ -40,7 +40,7 @@ abstract class ModelePdfReception extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db, $maxfilenamelength = 0)
public static function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;
@ -61,13 +61,13 @@ abstract class ModelePdfReception extends CommonDocGenerator
*/
abstract class ModelNumRefReception
{
var $error='';
public $error='';
/** Return if a model can be used or not
*
* @return boolean true if model can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@ -77,7 +77,7 @@ abstract class ModelNumRefReception
*
* @return string text description
*/
function info()
public function info()
{
global $langs;
$langs->load("reception");
@ -89,7 +89,7 @@ abstract class ModelNumRefReception
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $langs;
$langs->load("reception");
@ -101,7 +101,7 @@ abstract class ModelNumRefReception
*
* @return boolean false if conflit, true if ok
*/
function canBeActivated()
public function canBeActivated()
{
return true;
}
@ -113,7 +113,7 @@ abstract class ModelNumRefReception
* @param Object $shipment Shipment object
* @return string Value
*/
function getNextValue($objsoc, $shipment)
public function getNextValue($objsoc, $shipment)
{
global $langs;
return $langs->trans("NotAvailable");
@ -124,15 +124,15 @@ abstract class ModelNumRefReception
*
* @return string Value
*/
function getVersion()
public function getVersion()
{
global $langs;
$langs->load("admin");
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
if ($this->version == 'dolibarr') return DOL_VERSION;
if ($this->version) return $this->version;
elseif ($this->version == 'experimental') return $langs->trans("VersionExperimental");
elseif ($this->version == 'dolibarr') return DOL_VERSION;
elseif ($this->version) return $this->version;
return $langs->trans("NotAvailable");
}
}

View File

@ -56,7 +56,7 @@ class modGeneratePassNone extends ModeleGenPassword
* @param Translate $langs Handler de langue
* @param User $user Handler du user connecte
*/
function __construct($db, $conf, $langs, $user)
public function __construct($db, $conf, $langs, $user)
{
$this->id = "none";
$this->length = 0;
@ -72,7 +72,7 @@ class modGeneratePassNone extends ModeleGenPassword
*
* @return string Description of text
*/
function getDescription()
public function getDescription()
{
global $langs;
return $langs->trans("PasswordGenerationNone");
@ -83,7 +83,7 @@ class modGeneratePassNone extends ModeleGenPassword
*
* @return string Example of password
*/
function getExample()
public function getExample()
{
return $this->langs->trans("None");
}
@ -93,7 +93,7 @@ class modGeneratePassNone extends ModeleGenPassword
*
* @return string Return a new generated password
*/
function getNewGeneratedPassword()
public function getNewGeneratedPassword()
{
return "";
}
@ -104,7 +104,7 @@ class modGeneratePassNone extends ModeleGenPassword
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
function validatePassword($password)
public function validatePassword($password)
{
return 1;
}

View File

@ -70,7 +70,7 @@ class modGeneratePassPerso extends ModeleGenPassword
* @param Translate $langs Handler de langue
* @param User $user Handler du user connecte
*/
function __construct($db, $conf, $langs, $user)
public function __construct($db, $conf, $langs, $user)
{
$this->id = "Perso";
$this->length = $langs->trans("SetupPerso");
@ -120,7 +120,7 @@ class modGeneratePassPerso extends ModeleGenPassword
*
* @return string Description of text
*/
function getDescription()
public function getDescription()
{
global $langs;
return $langs->trans("PasswordGenerationPerso");
@ -131,39 +131,42 @@ class modGeneratePassPerso extends ModeleGenPassword
*
* @return string Example of password
*/
function getExample()
public function getExample()
{
return $this->getNewGeneratedPassword();
}
/**
* Build new password
* Build new password
*
* @return string Return a new generated password
* @return string Return a new generated password
*/
function getNewGeneratedPassword()
public function getNewGeneratedPassword()
{
$pass = "";
for($i=0; $i<$this->NbMaj; $i++){ // Y
for ($i=0; $i<$this->NbMaj; $i++) {
// Y
$pass .= $this->Maj[mt_rand(0, strlen($this->Maj) - 1)];
}
for($i=0; $i<$this->NbNum; $i++){ // X
for ($i=0; $i<$this->NbNum; $i++) {
// X
$pass .= $this->Nb[mt_rand(0, strlen($this->Nb) - 1)];
}
for($i=0; $i<$this->NbSpe; $i++){ // @
for ($i=0; $i<$this->NbSpe; $i++) {
// @
$pass .= $this->Spe[mt_rand(0, strlen($this->Spe) - 1)];
}
for($i=strlen($pass);$i<$this->length2; $i++){ // y
for ($i=strlen($pass);$i<$this->length2; $i++) {
// y
$pass .= $this->All[mt_rand(0, strlen($this->All) -1)];
}
$pass = str_shuffle($pass);
if ($this->validatePassword($pass))
{
if ($this->validatePassword($pass)) {
return $pass;
}
@ -171,31 +174,31 @@ class modGeneratePassPerso extends ModeleGenPassword
}
/**
* Validate a password
* Validate a password
*
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
function validatePassword($password)
public function validatePassword($password)
{
$password_a = str_split($password);
$maj = str_split($this->Maj);
$num = str_split($this->Nb);
$spe = str_split($this->Spe);
if(count(array_intersect($password_a, $maj)) < $this->NbMaj){
if (count(array_intersect($password_a, $maj)) < $this->NbMaj) {
return 0;
}
if(count(array_intersect($password_a, $num)) < $this->NbNum){
if (count(array_intersect($password_a, $num)) < $this->NbNum) {
return 0;
}
if(count(array_intersect($password_a, $spe)) < $this->NbSpe){
if (count(array_intersect($password_a, $spe)) < $this->NbSpe) {
return 0;
}
if(!$this->consecutiveInterationSameCharacter($password)){
if (!$this->consecutiveInterationSameCharacter($password)) {
return 0;
}
@ -203,25 +206,25 @@ class modGeneratePassPerso extends ModeleGenPassword
}
/**
* consecutive iterations of the same character
* consecutive iterations of the same character
*
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
function consecutiveInterationSameCharacter($password)
public function consecutiveInterationSameCharacter($password)
{
$last = "";
$count = 0;
$char = str_split($password);
foreach($char as $c){
if($c != $last){
foreach($char as $c) {
if($c != $last) {
$last = $c;
$count = 0;
}else{
} else {
$count++;
}
if($count >= $this->NbRepeat) {
if ($count >= $this->NbRepeat) {
return 0;
}
}

View File

@ -56,7 +56,7 @@ class modGeneratePassStandard extends ModeleGenPassword
* @param Translate $langs Handler de langue
* @param User $user Handler du user connecte
*/
function __construct($db, $conf, $langs, $user)
public function __construct($db, $conf, $langs, $user)
{
$this->id = "standard";
$this->length = 8;
@ -72,7 +72,7 @@ class modGeneratePassStandard extends ModeleGenPassword
*
* @return string Description of module
*/
function getDescription()
public function getDescription()
{
global $langs;
return $langs->trans("PasswordGenerationStandard");
@ -83,7 +83,7 @@ class modGeneratePassStandard extends ModeleGenPassword
*
* @return string Example of password
*/
function getExample()
public function getExample()
{
return $this->getNewGeneratedPassword();
}
@ -93,7 +93,7 @@ class modGeneratePassStandard extends ModeleGenPassword
*
* @return string Return a new generated password
*/
function getNewGeneratedPassword()
public function getNewGeneratedPassword()
{
// start with a blank password
$password = "";
@ -123,15 +123,15 @@ class modGeneratePassStandard extends ModeleGenPassword
return $password;
}
/**
* Validate a password
*
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
function validatePassword($password)
{
if (dol_strlen($password) < $this->length) return 0;
return 1;
}
/**
* Validate a password
*
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
public function validatePassword($password)
{
if (dol_strlen($password) < $this->length) return 0;
return 1;
}
}

View File

@ -40,7 +40,7 @@ abstract class ModeleGenPassword
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@ -50,18 +50,18 @@ abstract class ModeleGenPassword
*
* @return string Description of text
*/
function getDescription()
public function getDescription()
{
global $langs;
return $langs->trans("NoDescription");
}
/**
* Return an example of password generated by this module
* Return an example of password generated by this module
*
* @return string Example of password
* @return string Example of password
*/
function getExample()
public function getExample()
{
global $langs;
$langs->load("bills");
@ -69,11 +69,11 @@ abstract class ModeleGenPassword
}
/**
* Build new password
* Build new password
*
* @return string Return a new generated password
* @return string Return a new generated password
*/
function getNewGeneratedPassword()
public function getNewGeneratedPassword()
{
global $langs;
return $langs->trans("NotAvailable");
@ -85,7 +85,7 @@ abstract class ModeleGenPassword
* @param string $password Password to check
* @return int 0 if KO, >0 if OK
*/
function validatePassword($password)
public function validatePassword($password)
{
return 1;
}

View File

@ -54,7 +54,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf, $langs, $mysoc;
@ -90,7 +90,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
* @param Translate $langs Object language
* @return string Description
*/
function info($langs)
public function info($langs)
{
global $conf,$langs;
@ -174,7 +174,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
return $texte;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
*
@ -186,10 +186,10 @@ class doc_generic_odt extends ModeleThirdPartyDoc
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager;
global $user,$langs,$conf,$mysoc,$hookmanager;
if (empty($srctemplatepath))
{
@ -265,7 +265,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
$odfHandler = new odf(
$odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->societe->multidir_temp[$object->entity],
@ -419,7 +419,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
}
$odfHandler->saveToDisk($file);
}catch (Exception $e){
} catch (Exception $e){
$this->error=$e->getMessage();
dol_syslog($e->getMessage(), LOG_INFO);
return -1;

View File

@ -72,7 +72,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
/**
* Constructor
*/
function __construct()
public function __construct()
{
$this->code_null = 0;
$this->code_modifiable = 1;
@ -83,12 +83,13 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
}
/** Return description of module
/**
* Return description of module
*
* @param Translate $langs Object langs
* @return string Description of module
* @param Translate $langs Object langs
* @return string Description of module
*/
function info($langs)
public function info($langs)
{
global $conf, $mc;
global $form;
@ -139,7 +140,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Return string example
*/
function getExample($langs, $objsoc = 0, $type = -1)
public function getExample($langs, $objsoc = 0, $type = -1)
{
if ($type == 0 || $type == -1)
{
@ -200,7 +201,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
* @param int $type Client ou fournisseur (0:customer, 1:supplier)
* @return string Value if OK, '' if module not configured, <0 if KO
*/
function getNextValue($objsoc = 0, $type = -1)
public function getNextValue($objsoc = 0, $type = -1)
{
global $db,$conf;
@ -243,7 +244,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
*
* @return int 0 or 1
*/
function verif_prefixIsUsed()
public function verif_prefixIsUsed()
{
// phpcs:enable
global $conf;
@ -272,7 +273,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
* -4 ErrorPrefixRequired
* -5 Other (see this->error)
*/
function verif($db, &$code, $soc, $type)
public function verif($db, &$code, $soc, $type)
{
global $conf;
@ -324,7 +325,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if available, <0 if KO
*/
function verif_dispo($db, $code, $soc, $type = 0)
public function verif_dispo($db, $code, $soc, $type = 0)
{
// phpcs:enable
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe";

View File

@ -70,7 +70,7 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
/**
* Constructor
*/
function __construct()
public function __construct()
{
$this->code_null = 1;
$this->code_modifiable = 1;
@ -80,12 +80,13 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
}
/** Return description of module
/**
* Return description of module
*
* @param Translate $langs Object langs
* @return string Description of module
* @param Translate $langs Object langs
* @return string Description of module
*/
function info($langs)
public function info($langs)
{
$langs->load("companies");
return $langs->trans("LeopardNumRefModelDesc");
@ -99,7 +100,7 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Return next value
*/
function getNextValue($objsoc = 0, $type = -1)
public function getNextValue($objsoc = 0, $type = -1)
{
global $langs;
return '';
@ -119,7 +120,7 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
*/
function verif($db, &$code, $soc, $type)
public function verif($db, &$code, $soc, $type)
{
global $conf;

View File

@ -70,7 +70,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
/**
* Constructor
*/
function __construct()
public function __construct()
{
$this->nom = "Monkey";
$this->name = "Monkey";
@ -84,12 +84,13 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
}
/** Return description of module
/**
* Return description of module
*
* @param Translate $langs Object langs
* @return string Description of module
* @param Translate $langs Object langs
* @return string Description of module
*/
function info($langs)
public function info($langs)
{
return $langs->trans("MonkeyNumRefModelDesc", $this->prefixcustomer, $this->prefixsupplier);
}
@ -103,7 +104,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Return string example
*/
function getExample($langs, $objsoc = 0, $type = -1)
public function getExample($langs, $objsoc = 0, $type = -1)
{
return $this->prefixcustomer.'0901-00001<br>'.$this->prefixsupplier.'0901-00001';
}
@ -112,11 +113,11 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
/**
* Return next value
*
* @param Societe $objsoc Object third party
* @param int $type Client ou fournisseur (1:client, 2:fournisseur)
* @param Societe $objsoc Object third party
* @param int $type Client ou fournisseur (1:client, 2:fournisseur)
* @return string Value if OK, '' if module not configured, <0 if KO
*/
function getNextValue($objsoc = 0, $type = -1)
public function getNextValue($objsoc = 0, $type = -1)
{
global $db, $conf, $mc;
@ -177,7 +178,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
*/
function verif($db, &$code, $soc, $type)
public function verif($db, &$code, $soc, $type)
{
global $conf;
@ -224,7 +225,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoi si un code est pris ou non (par autre tiers)
*
@ -234,7 +235,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if available, <0 if KO
*/
function verif_dispo($db, $code, $soc, $type = 0)
public function verif_dispo($db, $code, $soc, $type = 0)
{
// phpcs:enable
global $conf, $mc;
@ -265,14 +266,14 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoi si un code respecte la syntaxe
* Renvoi si un code respecte la syntaxe
*
* @param string $code Code a verifier
* @return int 0 si OK, <0 si KO
* @param string $code Code a verifier
* @return int 0 si OK, <0 si KO
*/
function verif_syntax($code)
public function verif_syntax($code)
{
// phpcs:enable
$res = 0;

View File

@ -57,7 +57,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
/**
* Constructor
*/
function __construct()
public function __construct()
{
global $conf;
if (! isset($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER) || trim($conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER) == '') $conf->global->COMPANY_AQUARIUM_MASK_CUSTOMER='411';
@ -73,7 +73,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
* @param Translate $langs Object langs
* @return string Description of module
*/
function info($langs)
public function info($langs)
{
global $conf;
global $form;
@ -112,7 +112,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Return string example
*/
function getExample($langs, $objsoc = 0, $type = -1)
public function getExample($langs, $objsoc = 0, $type = -1)
{
$s='';
$s.=$this->prefixcustomeraccountancycode.'CUSTCODE';
@ -131,7 +131,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
* @param string $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
function get_code($db, $societe, $type = '')
public function get_code($db, $societe, $type = '')
{
// phpcs:enable
global $conf;
@ -196,7 +196,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
* @param string $type 'supplier' or 'customer'
* @return int 0 if OK but not available, >0 if OK and available, <0 if KO
*/
function verif($db, $code, $societe, $type)
public function verif($db, $code, $societe, $type)
{
$sql = "SELECT ";
if ($type == 'customer') $sql.= "code_compta";

View File

@ -52,7 +52,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
/**
* Constructor
*/
function __construct()
public function __construct()
{
}
@ -63,7 +63,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
* @param Translate $langs Object langs
* @return string Description of module
*/
function info($langs)
public function info($langs)
{
return $langs->trans("ModuleCompanyCode".$this->name);
}
@ -76,12 +76,12 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Example
*/
function getExample($langs, $objsoc = 0, $type = -1)
public function getExample($langs, $objsoc = 0, $type = -1)
{
return '';
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Set accountancy account code for a third party into this->code
*
@ -90,7 +90,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
* @param int $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
function get_code($db, $societe, $type = '')
public function get_code($db, $societe, $type = '')
{
// phpcs:enable
$this->code='';

View File

@ -46,7 +46,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db, $maxfilenamelength = 0)
public static function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;
@ -77,7 +77,7 @@ abstract class ModeleThirdPartyCode
* @param Translate $langs Object langs
* @return string Texte descripif
*/
function info($langs)
public function info($langs)
{
$langs->load("bills");
return $langs->trans("NoDescription");
@ -88,7 +88,7 @@ abstract class ModeleThirdPartyCode
* @param Translate $langs Object langs
* @return string Nom du module
*/
function getNom($langs)
public function getNom($langs)
{
return $this->nom;
}
@ -99,7 +99,7 @@ abstract class ModeleThirdPartyCode
* @param Translate $langs Object langs
* @return string Example
*/
function getExample($langs)
public function getExample($langs)
{
$langs->load("bills");
return $langs->trans("NoExample");
@ -110,7 +110,7 @@ abstract class ModeleThirdPartyCode
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
return true;
}
@ -122,18 +122,19 @@ abstract class ModeleThirdPartyCode
* @param int $type Type
* @return string Value
*/
function getNextValue($objsoc = 0, $type = -1)
public function getNextValue($objsoc = 0, $type = -1)
{
global $langs;
return $langs->trans("Function_getNextValue_InModuleNotWorking");
}
/** Return version of module
/**
* Return version of module
*
* @return string Version
* @return string Version
*/
function getVersion()
public function getVersion()
{
global $langs;
$langs->load("admin");
@ -145,7 +146,7 @@ abstract class ModeleThirdPartyCode
return $langs->trans("NotAvailable");
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoie la liste des modeles de numérotation
*
@ -153,7 +154,7 @@ abstract class ModeleThirdPartyCode
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
*/
static function liste_modeles($db, $maxfilenamelength = 0)
public static function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
$liste=array();
@ -186,7 +187,7 @@ abstract class ModeleThirdPartyCode
* @param int $type -1=Nothing, 0=Customer, 1=Supplier
* @return string HTML translated description
*/
function getToolTip($langs, $soc, $type)
public function getToolTip($langs, $soc, $type)
{
global $conf;
@ -251,7 +252,7 @@ abstract class ModeleThirdPartyCode
*
* @return int 0=no, 1=yes
*/
function verif_prefixIsUsed()
public function verif_prefixIsUsed()
{
// phpcs:enable
return 0;
@ -271,25 +272,27 @@ abstract class ModeleAccountancyCode
public $error='';
/** Return description of module
/**
* Return description of module
*
* @param Translate $langs Object langs
* @return string Description of module
* @param Translate $langs Object langs
* @return string Description of module
*/
function info($langs)
public function info($langs)
{
$langs->load("bills");
return $langs->trans("NoDescription");
}
/** Return an example of result returned by getNextValue
/**
* Return an example of result returned by getNextValue
*
* @param Translate $langs Object langs
* @param societe $objsoc Object thirdparty
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Example
* @param Translate $langs Object langs
* @param societe $objsoc Object thirdparty
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
* @return string Example
*/
function getExample($langs, $objsoc = 0, $type = -1)
public function getExample($langs, $objsoc = 0, $type = -1)
{
$langs->load("bills");
return $langs->trans("NoExample");
@ -300,16 +303,17 @@ abstract class ModeleAccountancyCode
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
return true;
}
/** Return version of module
/**
* Return version of module
*
* @return string Version
* @return string Version
*/
function getVersion()
public function getVersion()
{
global $langs;
$langs->load("admin");
@ -322,14 +326,14 @@ abstract class ModeleAccountancyCode
}
/**
* 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)
public function getToolTip($langs, $soc, $type)
{
global $conf,$db;
@ -358,7 +362,7 @@ abstract class ModeleAccountancyCode
return $s;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Set accountancy account code for a third party into this->code
*
@ -367,7 +371,7 @@ abstract class ModeleAccountancyCode
* @param int $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
function get_code($db, $societe, $type = '')
public function get_code($db, $societe, $type = '')
{
// phpcs:enable
global $langs;
@ -377,8 +381,6 @@ abstract class ModeleAccountancyCode
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Create a document onto disk according to template module.
*
@ -396,8 +398,7 @@ abstract class ModeleAccountancyCode
*/
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);
dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
}

View File

@ -61,7 +61,7 @@ class doc_generic_stock_odt extends ModelePDFStock
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf, $langs, $mysoc;
@ -106,7 +106,7 @@ class doc_generic_stock_odt extends ModelePDFStock
* @param Translate $langs Lang object to use for output
* @return string Description
*/
function info($langs)
public function info($langs)
{
global $conf, $langs;
@ -205,7 +205,7 @@ class doc_generic_stock_odt extends ModelePDFStock
return $texte;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
*
@ -217,7 +217,7 @@ class doc_generic_stock_odt extends ModelePDFStock
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $stock,$langs,$conf,$mysoc,$hookmanager,$user;
@ -357,13 +357,13 @@ class doc_generic_stock_odt extends ModelePDFStock
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
$odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->produit->dir_temp,
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
'DELIMITER_LEFT' => '{',
'DELIMITER_RIGHT' => '}'
$odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->produit->dir_temp,
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
'DELIMITER_LEFT' => '{',
'DELIMITER_RIGHT' => '}'
)
);
}

View File

@ -51,7 +51,7 @@ class pdf_standard extends ModelePDFStock
*/
public $description;
/**
/**
* @var string document type
*/
public $type;
@ -177,7 +177,7 @@ class pdf_standard extends ModelePDFStock
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
*
@ -189,7 +189,7 @@ class pdf_standard extends ModelePDFStock
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
@ -834,17 +834,17 @@ class pdf_standard extends ModelePDFStock
/**
* Show table for lines
*
* @param TCPDF $pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y (not used)
* @param Translate $outputlangs Langs object
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
* @param int $hidebottom Hide bottom bar of array
* @param string $currency Currency code
* @return void
* @param TCPDF $pdf Object PDF
* @param string $tab_top Top position of table
* @param string $tab_height Height of table (rectangle)
* @param int $nexY Y (not used)
* @param Translate $outputlangs Langs object
* @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
* @param int $hidebottom Hide bottom bar of array
* @param string $currency Currency code
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
{
global $conf;
@ -914,8 +914,7 @@ class pdf_standard extends ModelePDFStock
if (empty($hidetop))
{
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '',
'C');
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', 'C');
}
//$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
@ -948,7 +947,7 @@ $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->tran
* @param string $titlekey Translation key to show as title of document
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "")
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "")
{
global $conf,$langs,$db,$hookmanager;
@ -1176,7 +1175,7 @@ $pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->tran
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;

View File

@ -179,7 +179,7 @@ class pdf_stdmovement extends ModelePDFMovement
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
*
@ -191,7 +191,7 @@ class pdf_stdmovement extends ModelePDFMovement
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
@ -203,9 +203,9 @@ class pdf_stdmovement extends ModelePDFMovement
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
/**
* TODO: get from object
*/
/**
* TODO: get from object
*/
$id=GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
@ -327,9 +327,9 @@ class pdf_stdmovement extends ModelePDFMovement
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
/*
* END TODO
**/
/*
* END TODO
**/
//$nblignes = count($object->lines);
@ -822,7 +822,7 @@ class pdf_stdmovement extends ModelePDFMovement
* @param string $currency Currency code
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
{
global $conf;
@ -948,7 +948,7 @@ class pdf_stdmovement extends ModelePDFMovement
* @param string $titlekey Translation key to show as title of document
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "")
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "")
{
global $conf,$langs,$db,$hookmanager;
@ -1168,15 +1168,15 @@ class pdf_stdmovement extends ModelePDFMovement
}
/**
* Show footer of page. Need this->emetteur object
* Show footer of page. Need this->emetteur object
*
* @param TCPDF $pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
* @param TCPDF $pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;

View File

@ -36,7 +36,7 @@ abstract class ModelePDFMovement extends CommonDocGenerator
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -44,7 +44,7 @@ abstract class ModelePDFMovement extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db, $maxfilenamelength = 0)
public static function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;

View File

@ -19,25 +19,25 @@
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
/**
* Parent class for stock models of doc generators
* Parent class for stock models of doc generators
*/
abstract class ModelePDFStock extends CommonDocGenerator
{
/**
* @var string Error code (or message)
*/
public $error='';
* @var string Error code (or message)
*/
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
static function liste_modeles($db, $maxfilenamelength = 0)
public static function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;