add visibility

This commit is contained in:
Frédéric FRANCE 2019-03-01 19:24:06 +01:00
parent bd2e541fd6
commit c5c27fdb77
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
35 changed files with 462 additions and 466 deletions

View File

@ -201,7 +201,7 @@
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
<severity>0</severity>
</rule>
<!--<rule ref="Squiz.Scope.MethodScope.Missing" />-->
<rule ref="Squiz.Scope.MethodScope.Missing" />
<!-- Rules from PEAR Standard -->

View File

@ -33,16 +33,16 @@ interface Database
* @param string $resko resultat si test non egal
* @return string SQL string
*/
function ifsql($test, $resok, $resko);
public function ifsql($test, $resok, $resko);
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return datas as an array
*
* @param resource $resultset Resultset of request
* @return array Array
*/
function fetch_row($resultset);
public function fetch_row($resultset);
// phpcs:enable
/**
@ -52,23 +52,23 @@ interface Database
* @param int $param Date TMS to convert
* @return string Date in a string YYYYMMDDHHMMSS
*/
function idate($param);
public function idate($param);
/**
* Return last error code
*
* @return string lasterrno
*/
function lasterrno();
public function lasterrno();
/**
* Start transaction
*
* @return int 1 if transaction successfuly opened or already opened, 0 if error
*/
function begin();
public function begin();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Create a new database
* Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated
@ -80,7 +80,7 @@ interface Database
* @param string $owner Username of database owner
* @return resource resource defined if OK, null if KO
*/
function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
public function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
// phpcs:enable
/**
@ -88,7 +88,7 @@ interface Database
*
* @return array Version array
*/
function getVersionArray();
public function getVersionArray();
/**
* Convert a SQL request in Mysql syntax to native syntax
@ -97,9 +97,9 @@ interface Database
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
* @return string SQL request line converted
*/
static function convertSQLFromMysql($line, $type = 'ddl');
public static function convertSQLFromMysql($line, $type = 'ddl');
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoie le nombre de lignes dans le resultat d'une requete INSERT, DELETE ou UPDATE
*
@ -107,7 +107,7 @@ interface Database
* @return int Nombre de lignes
* @see num_rows
*/
function affected_rows($resultset);
public function affected_rows($resultset);
// phpcs:enable
/**
@ -115,9 +115,9 @@ interface Database
*
* @return string Error text
*/
function error();
public function error();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* List tables into a database
*
@ -125,7 +125,7 @@ interface Database
* @param string $table Nmae of table filter ('xxx%')
* @return array List of tables in an array
*/
function DDLListTables($database, $table = '');
public function DDLListTables($database, $table = '');
// phpcs:enable
/**
@ -133,7 +133,7 @@ interface Database
*
* @return string Last query
*/
function lastquery();
public function lastquery();
/**
* Define sort criteria of request
@ -142,7 +142,7 @@ interface Database
* @param string $sortorder Sort order
* @return string String to provide syntax of a sort sql string
*/
function order($sortfield = null, $sortorder = null);
public function order($sortfield = null, $sortorder = null);
/**
* Decrypt sensitive data in database
@ -150,16 +150,16 @@ interface Database
* @param string $value Value to decrypt
* @return string Decrypted value if used
*/
function decrypt($value);
public function decrypt($value);
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return datas as an array
*
* @param resource $resultset Resultset of request
* @return array Array
*/
function fetch_array($resultset);
public function fetch_array($resultset);
// phpcs:enable
/**
@ -167,7 +167,7 @@ interface Database
*
* @return string lasterror
*/
function lasterror();
public function lasterror();
/**
* Escape a string to insert data
@ -175,9 +175,9 @@ interface Database
* @param string $stringtoencode String to escape
* @return string String escaped
*/
function escape($stringtoencode);
public function escape($stringtoencode);
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Get last ID after an insert INSERT
*
@ -185,7 +185,7 @@ interface Database
* @param string $fieldid Field name
* @return int Id of row
*/
function last_insert_id($tab, $fieldid = 'rowid');
public function last_insert_id($tab, $fieldid = 'rowid');
// phpcs:enable
/**
@ -193,7 +193,7 @@ interface Database
*
* @return string Full path of restore program
*/
function getPathOfRestore();
public function getPathOfRestore();
/**
* Annulation d'une transaction et retour aux anciennes valeurs
@ -201,7 +201,7 @@ interface Database
* @param string $log Add more log to default log line
* @return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur
*/
function rollback($log = '');
public function rollback($log = '');
/**
* Execute a SQL request and return the resultset
@ -212,7 +212,7 @@ interface Database
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
* @return resource Resultset of answer
*/
function query($query, $usesavepoint = 0, $type = 'auto');
public function query($query, $usesavepoint = 0, $type = 'auto');
/**
* Connexion to server
@ -225,7 +225,7 @@ interface Database
* @return resource Database access handler
* @see close
*/
function connect($host, $login, $passwd, $name, $port = 0);
public function connect($host, $login, $passwd, $name, $port = 0);
/**
* Define limits and offset of request
@ -234,7 +234,7 @@ interface Database
* @param int $offset Numero of line from where starting fetch
* @return string String with SQL syntax to add a limit and offset
*/
function plimit($limit = 0, $offset = 0);
public function plimit($limit = 0, $offset = 0);
/**
* Return value of server parameters
@ -242,7 +242,7 @@ interface Database
* @param string $filter Filter list on a particular value
* @return array Array of key-values (key=>value)
*/
function getServerParametersValues($filter = '');
public function getServerParametersValues($filter = '');
/**
* Return value of server status
@ -250,16 +250,16 @@ interface Database
* @param string $filter Filter list on a particular value
* @return array Array of key-values (key=>value)
*/
function getServerStatusValues($filter = '');
public function getServerStatusValues($filter = '');
/**
* Return collation used in database
*
* @return string Collation value
*/
function getDefaultCollationDatabase();
public function getDefaultCollationDatabase();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return number of lines for result of a SELECT
*
@ -267,7 +267,7 @@ interface Database
* @return int Nb of lines
* @see affected_rows
*/
function num_rows($resultset);
public function num_rows($resultset);
// phpcs:enable
/**
@ -275,23 +275,23 @@ interface Database
*
* @return string Full path of dump program
*/
function getPathOfDump();
public function getPathOfDump();
/**
* Return version of database client driver
*
* @return string Version string
*/
function getDriverInfo();
public function getDriverInfo();
/**
* Return generic error code of last operation.
*
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
*/
function errno();
public function errno();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Create a table into database
*
@ -304,17 +304,17 @@ interface Database
* @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK
*/
function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
// phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Drop a table into database
*
* @param string $table Name of table
* @return int <0 if KO, >=0 if OK
*/
function DDLDropTable($table);
public function DDLDropTable($table);
// phpcs:enable
/**
@ -322,9 +322,9 @@ interface Database
*
* @return array List of Charset
*/
function getListOfCharacterSet();
public function getListOfCharacterSet();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Create a new field into table
*
@ -334,10 +334,10 @@ interface Database
* @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK
*/
function DDLAddField($table, $field_name, $field_desc, $field_position = "");
public function DDLAddField($table, $field_name, $field_desc, $field_position = "");
// phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Drop a field from table
*
@ -345,10 +345,10 @@ interface Database
* @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK
*/
function DDLDropField($table, $field_name);
public function DDLDropField($table, $field_name);
// phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Update format of a field into a table
*
@ -357,7 +357,7 @@ interface Database
* @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK
*/
function DDLUpdateField($table, $field_name, $field_desc);
public function DDLUpdateField($table, $field_name, $field_desc);
// phpcs:enable
/**
@ -365,9 +365,9 @@ interface Database
*
* @return array List of Collation
*/
function getListOfCollation();
public function getListOfCollation();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return a pointer of line with description of a table or field
*
@ -375,7 +375,7 @@ interface Database
* @param string $field Optionnel : Name of field if we want description of field
* @return resource Resource
*/
function DDLDescTable($table, $field = "");
public function DDLDescTable($table, $field = "");
// phpcs:enable
/**
@ -383,16 +383,16 @@ interface Database
*
* @return string Version string
*/
function getVersion();
public function getVersion();
/**
* Return charset used to store data in database
*
* @return string Charset
*/
function getDefaultCharacterSetDatabase();
public function getDefaultCharacterSetDatabase();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Create a user and privileges to connect to database (even if database does not exists yet)
*
@ -400,13 +400,13 @@ interface Database
* @param string $dolibarr_main_db_user Nom user a creer
* @param string $dolibarr_main_db_pass Mot de passe user a creer
* @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK
*/
function DDLCreateUser(
$dolibarr_main_db_host,
$dolibarr_main_db_user,
$dolibarr_main_db_pass,
$dolibarr_main_db_name
* @return int <0 if KO, >=0 if OK
*/
public function DDLCreateUser(
$dolibarr_main_db_host,
$dolibarr_main_db_user,
$dolibarr_main_db_pass,
$dolibarr_main_db_name
);
// phpcs:enable
@ -419,7 +419,7 @@ interface Database
* @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ
* @return int|string Date TMS or ''
*/
function jdate($string, $gm = false);
public function jdate($string, $gm = false);
/**
* Encrypt sensitive data in database
@ -429,7 +429,7 @@ interface Database
* @param int $withQuotes Return string with quotes
* @return string XXX(field) or XXX('value') or field or 'value'
*/
function encrypt($fieldorvalue, $withQuotes = 0);
public function encrypt($fieldorvalue, $withQuotes = 0);
/**
* Validate a database transaction
@ -437,25 +437,25 @@ interface Database
* @param string $log Add more log to default log line
* @return int 1 if validation is OK or transaction level no started, 0 if ERROR
*/
function commit($log = '');
public function commit($log = '');
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* List information of columns into a table.
*
* @param string $table Name of table
* @return array Array with inforation on table
*/
function DDLInfoTable($table);
* @return array Array with inforation on table
*/
public function DDLInfoTable($table);
// phpcs:enable
/**
/**
* Free last resultset used.
*
* @param resource $resultset Fre cursor
* @return void
*/
function free($resultset = null);
public function free($resultset = null);
/**
* Close database connexion
@ -463,41 +463,41 @@ interface Database
* @return boolean True if disconnect successfull, false otherwise
* @see connect
*/
function close();
public function close();
/**
* Return last query in error
*
* @return string lastqueryerror
*/
function lastqueryerror();
public function lastqueryerror();
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return connexion ID
*
* @return string Id connexion
*/
function DDLGetConnectId();
public function DDLGetConnectId();
// phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoie la ligne courante (comme un objet) pour le curseur resultset
*
* @param resource $resultset Curseur de la requete voulue
* @return Object Object result line or false if KO or end of cursor
*/
function fetch_object($resultset);
public function fetch_object($resultset);
// phpcs:enable
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Select a database
*
* @param string $database Name of database
* @return boolean true if OK, false if KO
*/
function select_db($database);
public function select_db($database);
// phpcs:enable
}

View File

@ -75,7 +75,7 @@ abstract class DoliDB implements Database
* @param string $resko resultat si test non egal
* @return string SQL string
*/
function ifsql($test, $resok, $resko)
public function ifsql($test, $resok, $resko)
{
return 'IF('.$test.','.$resok.','.$resko.')';
}
@ -87,7 +87,7 @@ abstract class DoliDB implements Database
* @param int $param Date TMS to convert
* @return string Date in a string YYYY-MM-DD HH:MM:SS
*/
function idate($param)
public function idate($param)
{
// TODO GMT $param should be gmt, so we should add tzouptut to 'gmt'
return dol_print_date($param, "%Y-%m-%d %H:%M:%S");
@ -98,7 +98,7 @@ abstract class DoliDB implements Database
*
* @return string lasterrno
*/
function lasterrno()
public function lasterrno()
{
return $this->lasterrno;
}
@ -108,7 +108,7 @@ abstract class DoliDB implements Database
*
* @return int 1 if transaction successfuly opened or already opened, 0 if error
*/
function begin()
public function begin()
{
if (! $this->transaction_opened)
{
@ -135,7 +135,7 @@ abstract class DoliDB implements Database
* @param string $log Add more log to default log line
* @return int 1 if validation is OK or transaction level no started, 0 if ERROR
*/
function commit($log = '')
public function commit($log = '')
{
dol_syslog('', 0, -1);
if ($this->transaction_opened<=1)
@ -165,7 +165,7 @@ abstract class DoliDB implements Database
* @param string $log Add more log to default log line
* @return resource|int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur
*/
function rollback($log = '')
public function rollback($log = '')
{
dol_syslog('', 0, -1);
if ($this->transaction_opened<=1)
@ -189,7 +189,7 @@ abstract class DoliDB implements Database
* @param int $offset Numero of line from where starting fetch
* @return string String with SQL syntax to add a limit and offset
*/
function plimit($limit = 0, $offset = 0)
public function plimit($limit = 0, $offset = 0)
{
global $conf;
if (empty($limit)) return "";
@ -203,7 +203,7 @@ abstract class DoliDB implements Database
*
* @return array Version array
*/
function getVersionArray()
public function getVersionArray()
{
return preg_split("/[\.,-]/", $this->getVersion());
}
@ -213,7 +213,7 @@ abstract class DoliDB implements Database
*
* @return string Last query
*/
function lastquery()
public function lastquery()
{
return $this->lastquery;
}
@ -225,7 +225,7 @@ abstract class DoliDB implements Database
* @param string $sortorder Sort order, separated by comma. Example: 'ASC,DESC';
* @return string String to provide syntax of a sort sql string
*/
function order($sortfield = null, $sortorder = null)
public function order($sortfield = null, $sortorder = null)
{
if (! empty($sortfield))
{
@ -264,7 +264,7 @@ abstract class DoliDB implements Database
*
* @return string Last error
*/
function lasterror()
public function lasterror()
{
return $this->lasterror;
}
@ -278,7 +278,7 @@ abstract class DoliDB implements Database
* @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ
* @return int|string Date TMS or ''
*/
function jdate($string, $gm = false)
public function jdate($string, $gm = false)
{
// TODO GMT must set param gm to true by default
if ($string==0 || $string=="0000-00-00 00:00:00") return '';
@ -293,7 +293,7 @@ abstract class DoliDB implements Database
*
* @return string lastqueryerror
*/
function lastqueryerror()
public function lastqueryerror()
{
return $this->lastqueryerror;
}

View File

@ -162,7 +162,7 @@ class DoliDBMysqli extends DoliDB
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
* @return string SQL request line converted
*/
static function convertSQLFromMysql($line, $type = 'ddl')
public static function convertSQLFromMysql($line, $type = 'ddl')
{
return $line;
}
@ -194,14 +194,14 @@ class DoliDBMysqli extends DoliDB
* @see close
*/
public function connect($host, $login, $passwd, $name, $port = 0)
{
{
dol_syslog(get_class($this) . "::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name", LOG_DEBUG);
// Can also be
// mysqli::init(); mysql::options(MYSQLI_INIT_COMMAND, 'SET AUTOCOMMIT = 0'); mysqli::options(MYSQLI_OPT_CONNECT_TIMEOUT, 5);
// return mysqli::real_connect($host, $user, $pass, $db, $port);
return new mysqli($host, $login, $passwd, $name, $port);
}
}
/**
* Return version of database server
@ -219,9 +219,9 @@ class DoliDBMysqli extends DoliDB
* @return string Version string
*/
public function getDriverInfo()
{
return $this->db->client_info;
}
{
return $this->db->client_info;
}
/**

View File

@ -150,7 +150,7 @@ class DoliDBPgsql extends DoliDB
* @param bool $unescapeslashquot Unescape slash quote with quote quote
* @return string SQL request line converted
*/
static function convertSQLFromMysql($line, $type = 'auto', $unescapeslashquot = false)
public static function convertSQLFromMysql($line, $type = 'auto', $unescapeslashquot = false)
{
global $conf;

View File

@ -1247,7 +1247,7 @@ class DoliDBSqlite3 extends DoliDB
$pragmas = array(
'application_id', 'auto_vacuum', 'automatic_index', 'busy_timeout', 'cache_size',
'cache_spill', 'case_sensitive_like', 'checkpoint_fullsync', 'collation_list',
'compile_options', 'data_version', /*'database_list',*/
'compile_options', 'data_version', /*'database_list',*/
'defer_foreign_keys', 'encoding', 'foreign_key_check', 'freelist_count',
'full_column_names', 'fullsync', 'ingore_check_constraints', 'integrity_check',
'journal_mode', 'journal_size_limit', 'legacy_file_format', 'locking_mode',

View File

@ -68,7 +68,7 @@ class pdf_einstein extends ModelePDFCommandes
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);

View File

@ -40,7 +40,7 @@ class html_cerfafr extends ModeleDon
*
* @param DoliDb $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs;
@ -58,13 +58,13 @@ class html_cerfafr extends ModeleDon
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Write the object to document file to disk
*
@ -73,7 +73,7 @@ class html_cerfafr extends ModeleDon
* @param string $currency Currency code
* @return int >0 if OK, <0 if KO
*/
function write_file($don, $outputlangs, $currency = '')
public function write_file($don, $outputlangs, $currency = '')
{
// phpcs:enable
global $user,$conf,$langs,$mysoc;
@ -306,22 +306,22 @@ class html_cerfafr extends ModeleDon
$dix[3]=intval($valeur_entiere%100000000/10000000);
$cent[3]=intval($valeur_entiere%1000000000/100000000);
$chif=array('', 'un', 'deux', 'trois', 'quatre', 'cinq', 'six', 'sept', 'huit', 'neuf', 'dix', 'onze', 'douze', 'treize', 'quatorze', 'quinze', 'seize', 'dix sept', 'dix huit', 'dix neuf');
$secon_c='';
$trio_c='';
for($i=1; $i<=3; $i++){
$secon_c='';
$trio_c='';
for($i=1; $i<=3; $i++) {
$prim[$i]='';
$secon[$i]='';
$trio[$i]='';
if($dix[$i]==0){
if ($dix[$i]==0) {
$secon[$i]='';
$prim[$i]=$chif[$unite[$i]];
}
elseif($dix[$i]==1){
elseif ($dix[$i]==1) {
$secon[$i]='';
$prim[$i]=$chif[($unite[$i]+10)];
}
elseif($dix[$i]==2){
if($unite[$i]==1){
elseif ($dix[$i]==2) {
if ($unite[$i]==1) {
$secon[$i]='vingt et';
$prim[$i]=$chif[$unite[$i]];
}
@ -330,8 +330,8 @@ class html_cerfafr extends ModeleDon
$prim[$i]=$chif[$unite[$i]];
}
}
elseif($dix[$i]==3){
if($unite[$i]==1){
elseif ($dix[$i]==3) {
if ($unite[$i]==1) {
$secon[$i]='trente et';
$prim[$i]=$chif[$unite[$i]];
}
@ -340,8 +340,8 @@ class html_cerfafr extends ModeleDon
$prim[$i]=$chif[$unite[$i]];
}
}
elseif($dix[$i]==4){
if($unite[$i]==1){
elseif ($dix[$i]==4) {
if ($unite[$i]==1) {
$secon[$i]='quarante et';
$prim[$i]=$chif[$unite[$i]];
}
@ -350,8 +350,8 @@ class html_cerfafr extends ModeleDon
$prim[$i]=$chif[$unite[$i]];
}
}
elseif($dix[$i]==5){
if($unite[$i]==1){
elseif ($dix[$i]==5) {
if ($unite[$i]==1) {
$secon[$i]='cinquante et';
$prim[$i]=$chif[$unite[$i]];
}
@ -360,8 +360,8 @@ class html_cerfafr extends ModeleDon
$prim[$i]=$chif[$unite[$i]];
}
}
elseif($dix[$i]==6){
if($unite[$i]==1){
elseif ($dix[$i]==6) {
if ($unite[$i]==1) {
$secon[$i]='soixante et';
$prim[$i]=$chif[$unite[$i]];
}
@ -370,8 +370,8 @@ class html_cerfafr extends ModeleDon
$prim[$i]=$chif[$unite[$i]];
}
}
elseif($dix[$i]==7){
if($unite[$i]==1){
elseif ($dix[$i]==7) {
if ($unite[$i]==1) {
$secon[$i]='soixante et';
$prim[$i]=$chif[$unite[$i]+10];
}
@ -380,8 +380,8 @@ class html_cerfafr extends ModeleDon
$prim[$i]=$chif[$unite[$i]+10];
}
}
elseif($dix[$i]==8){
if($unite[$i]==1){
elseif ($dix[$i]==8) {
if ($unite[$i]==1) {
$secon[$i]='quatre-vingts et';
$prim[$i]=$chif[$unite[$i]];
}
@ -390,8 +390,8 @@ class html_cerfafr extends ModeleDon
$prim[$i]=$chif[$unite[$i]];
}
}
elseif($dix[$i]==9){
if($unite[$i]==1){
elseif ($dix[$i]==9) {
if ($unite[$i]==1) {
$secon[$i]='quatre-vingts et';
$prim[$i]=$chif[$unite[$i]+10];
}
@ -407,19 +407,19 @@ class html_cerfafr extends ModeleDon
$chif2=array('', 'dix', 'vingt', 'trente', 'quarante', 'cinquante', 'soixante', 'soixante-dix', 'quatre-vingts', 'quatre-vingts dix');
$secon_c=$chif2[$dix_c];
if($cent_c==1) $trio_c='cent';
elseif($cent_c!=0 || $cent_c!='') $trio_c=$chif[$cent_c] .' cents';
if ($cent_c==1) $trio_c='cent';
elseif ($cent_c!=0 || $cent_c!='') $trio_c=$chif[$cent_c] .' cents';
if(($cent[3]==0 || $cent[3]=='') && ($dix[3]==0 || $dix[3]=='') && ($unite[3]==1))
if (($cent[3]==0 || $cent[3]=='') && ($dix[3]==0 || $dix[3]=='') && ($unite[3]==1))
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' million ';
elseif(($cent[3]!=0 && $cent[3]!='') || ($dix[3]!=0 && $dix[3]!='') || ($unite[3]!=0 && $unite[3]!=''))
elseif (($cent[3]!=0 && $cent[3]!='') || ($dix[3]!=0 && $dix[3]!='') || ($unite[3]!=0 && $unite[3]!=''))
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3]. ' millions ';
else
$somme = $trio[3]. ' ' .$secon[3]. ' ' . $prim[3];
if(($cent[2]==0 || $cent[2]=='') && ($dix[2]==0 || $dix[2]=='') && ($unite[2]==1))
if (($cent[2]==0 || $cent[2]=='') && ($dix[2]==0 || $dix[2]=='') && ($unite[2]==1))
$somme = $somme.' mille ';
elseif(($cent[2]!=0 && $cent[2]!='') || ($dix[2]!=0 && $dix[2]!='') || ($unite[2]!=0 && $unite[2]!=''))
elseif (($cent[2]!=0 && $cent[2]!='') || ($dix[2]!=0 && $dix[2]!='') || ($unite[2]!=0 && $unite[2]!=''))
$somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2]. ' milles ';
else
$somme = $somme. $trio[2]. ' ' .$secon[2]. ' ' . $prim[2];
@ -428,7 +428,7 @@ class html_cerfafr extends ModeleDon
$somme = $somme. ' '. $dev1 .' ' ;
if(($cent_c=='0' || $cent_c=='') && ($dix_c=='0' || $dix_c==''))
if (($cent_c=='0' || $cent_c=='') && ($dix_c=='0' || $dix_c==''))
return $somme. ' et z&eacute;ro '. $dev2;
else
return $somme. $trio_c. ' ' .$secon_c. ' ' . $dev2;

View File

@ -58,7 +58,7 @@ class pdf_merou extends ModelePdfExpedition
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
@ -116,7 +116,7 @@ class pdf_merou extends ModelePdfExpedition
*
* @param DoliDB $db Database handler
*/
function __construct($db = 0)
public function __construct($db = 0)
{
global $conf,$langs,$mysoc;
@ -142,7 +142,7 @@ class pdf_merou extends ModelePdfExpedition
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@ -154,7 +154,7 @@ class pdf_merou extends ModelePdfExpedition
* @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,$mysoc,$hookmanager;
@ -460,7 +460,7 @@ class pdf_merou extends ModelePdfExpedition
* @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 $langs;
$default_font_size = pdf_getPDFFontSize($outputlangs);
@ -498,7 +498,7 @@ class pdf_merou extends ModelePdfExpedition
* @param int $hidefreetext 1=Hide free text
* @return void
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
$default_font_size = pdf_getPDFFontSize($outputlangs);
$pdf->SetFont('', '', $default_font_size - 2);
@ -527,7 +527,7 @@ class pdf_merou extends ModelePdfExpedition
* @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,$hookmanager;

View File

@ -57,7 +57,7 @@ class pdf_rouget extends ModelePdfExpedition
public $type;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
@ -115,7 +115,7 @@ class pdf_rouget extends ModelePdfExpedition
*
* @param DoliDB $db Database handler
*/
function __construct($db = 0)
public function __construct($db = 0)
{
global $conf,$langs,$mysoc;
@ -156,23 +156,22 @@ class pdf_rouget extends ModelePdfExpedition
$this->posxpicture=$this->posxweightvol - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
if ($this->page_largeur < 210) // To work with US executive format
{
$this->posxweightvol-=20;
$this->posxpicture-=20;
$this->posxqtyordered-=20;
$this->posxqtytoship-=20;
}
// To work with US executive format
if ($this->page_largeur < 210) {
$this->posxweightvol-=20;
$this->posxpicture-=20;
$this->posxqtyordered-=20;
$this->posxqtytoship-=20;
}
if (! empty($conf->global->SHIPPING_PDF_HIDE_ORDERED))
{
if (! empty($conf->global->SHIPPING_PDF_HIDE_ORDERED)) {
$this->posxweightvol += ($this->posxqtytoship - $this->posxqtyordered);
$this->posxpicture += ($this->posxqtytoship - $this->posxqtyordered);
$this->posxqtyordered = $this->posxqtytoship;
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@ -184,7 +183,7 @@ class pdf_rouget extends ModelePdfExpedition
* @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;
@ -664,7 +663,7 @@ class pdf_rouget extends ModelePdfExpedition
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show total to pay
*
@ -675,7 +674,7 @@ class pdf_rouget extends ModelePdfExpedition
* @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;
@ -783,7 +782,7 @@ class pdf_rouget extends ModelePdfExpedition
* @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;

View File

@ -192,7 +192,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
* Function to build a document on disk using the generic odt module.
*
* @param Facture $object Object source to build document
* @param Translate $outputlangs Lang output object
@ -203,7 +203,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
* @return int 1 if OK, <=0 if KO
*/
public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager;

View File

@ -137,7 +137,7 @@ class pdf_crabe extends ModelePDFFactures
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf, $langs, $mysoc;
@ -782,7 +782,7 @@ class pdf_crabe extends ModelePDFFactures
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show payments table
*
@ -793,7 +793,7 @@ class pdf_crabe extends ModelePDFFactures
* @param int $heightforfooter height for footer
* @return int <0 if KO, >0 if OK
*/
function _tableau_versements(&$pdf, $object, $posy, $outputlangs, $heightforfooter = 0)
private function _tableau_versements(&$pdf, $object, $posy, $outputlangs, $heightforfooter = 0)
{
// phpcs:enable
global $conf;
@ -928,7 +928,7 @@ class pdf_crabe extends ModelePDFFactures
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function _tableau_versements_header
*
@ -942,7 +942,7 @@ class pdf_crabe extends ModelePDFFactures
* @param int $tab3_height height
* @return void
*/
function _tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top, $tab3_width, $tab3_height)
private function _tableau_versements_header($pdf, $object, $outputlangs, $default_font_size, $tab3_posx, $tab3_top, $tab3_width, $tab3_height)
{
// phpcs:enable
$title=$outputlangs->transnoentities("PaymentsAlreadyDone");
@ -967,7 +967,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->line($tab3_posx, $tab3_top-1+$tab3_height, $tab3_posx+$tab3_width, $tab3_top-1+$tab3_height);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show miscellaneous information (payment mode, payment term, ...)
*
@ -977,7 +977,7 @@ class pdf_crabe extends ModelePDFFactures
* @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;
@ -1126,7 +1126,7 @@ class pdf_crabe extends ModelePDFFactures
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show total to pay
*
@ -1137,7 +1137,7 @@ class pdf_crabe extends ModelePDFFactures
* @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;
@ -1455,7 +1455,7 @@ class pdf_crabe extends ModelePDFFactures
* @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;
@ -1611,7 +1611,7 @@ class pdf_crabe extends ModelePDFFactures
* @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;
@ -1886,7 +1886,7 @@ class pdf_crabe extends ModelePDFFactures
* @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

@ -1,13 +1,13 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -26,9 +26,9 @@
*/
/**
* \file htdocs/core/modules/facture/doc/pdf_sponge.modules.php
* \ingroup facture
* \brief File of class to generate customers invoices from sponge model
* \file htdocs/core/modules/facture/doc/pdf_sponge.modules.php
* \ingroup facture
* \brief File of class to generate customers invoices from sponge model
*/
require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
@ -59,7 +59,7 @@ class pdf_sponge extends ModelePDFFactures
public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
@ -106,7 +106,7 @@ class pdf_sponge extends ModelePDFFactures
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@ -860,7 +860,7 @@ class pdf_sponge extends ModelePDFFactures
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs)
public function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@ -1148,9 +1148,9 @@ class pdf_sponge extends ModelePDFFactures
/**
* Show total to pay
* Show total to pay
*
* @param PDF $pdf Object PDF
* @param PDF $pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
@ -1478,7 +1478,7 @@ class pdf_sponge extends ModelePDFFactures
* @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;
@ -1545,7 +1545,7 @@ class pdf_sponge extends ModelePDFFactures
* @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;
@ -1818,7 +1818,7 @@ class pdf_sponge extends ModelePDFFactures
* @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;
@ -1826,16 +1826,16 @@ class pdf_sponge extends ModelePDFFactures
}
/**
* Define Array Column Field
* Define Array Column Field
*
* @param object $object common object
* @param outputlangs $outputlangs langs
* @param int $hidedetails Do not show line details
* @param int $hidedesc Do not show desc
* @param int $hideref Do not show ref
* @return null
*/
function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
* @param object $object common object
* @param outputlangs $outputlangs langs
* @param int $hidedetails Do not show line details
* @param int $hidedesc Do not show desc
* @param int $hideref Do not show ref
* @return null
*/
public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
global $conf, $hookmanager;

View File

@ -53,7 +53,7 @@ class mod_facture_mars extends ModeleNumRefFactures
/**
* Constructor
*/
function __construct()
public function __construct()
{
if (! empty($conf->global->INVOICE_NUMBERING_MARS_FORCE_PREFIX))
{
@ -66,7 +66,7 @@ class mod_facture_mars extends ModeleNumRefFactures
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $langs;
$langs->load("bills");
@ -78,7 +78,7 @@ class mod_facture_mars extends ModeleNumRefFactures
*
* @return string Example
*/
function getExample()
public function getExample()
{
return $this->prefixinvoice."0501-0001";
}
@ -89,7 +89,7 @@ class mod_facture_mars extends ModeleNumRefFactures
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
global $langs,$conf,$db;
@ -149,7 +149,7 @@ class mod_facture_mars extends ModeleNumRefFactures
* @param string $mode 'next' for next value or 'last' for last value
* @return string Value
*/
function getNextValue($objsoc, $invoice, $mode = 'next')
public function getNextValue($objsoc, $invoice, $mode = 'next')
{
global $db;
$prefix=$this->prefixinvoice;
@ -216,16 +216,16 @@ class mod_facture_mars extends ModeleNumRefFactures
else dol_print_error('', 'Bad parameter for getNextValue');
}
/**
* Return next free value
*
* @param Societe $objsoc Object third party
* @param string $objforref Object for number to search
* @param string $mode 'next' for next value or 'last' for last value
* @return string Next free value
*/
function getNumRef($objsoc, $objforref, $mode = 'next')
{
return $this->getNextValue($objsoc, $objforref, $mode);
}
/**
* Return next free value
*
* @param Societe $objsoc Object third party
* @param string $objforref Object for number to search
* @param string $mode 'next' for next value or 'last' for last value
* @return string Next free value
*/
public function getNumRef($objsoc, $objforref, $mode = 'next')
{
return $this->getNextValue($objsoc, $objforref, $mode);
}
}

View File

@ -50,7 +50,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $db, $conf, $langs;
@ -108,7 +108,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $conf,$langs,$mysoc;
@ -135,7 +135,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
* @param string $mode 'next' for next value or 'last' for last value
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $invoice, $mode = 'next')
public function getNextValue($objsoc, $invoice, $mode = 'next')
{
global $db,$conf;
@ -182,7 +182,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
* @param string $mode 'next' for next value or 'last' for last value
* @return string Next free value
*/
function getNumRef($objsoc, $objforref, $mode = 'next')
public function getNumRef($objsoc, $objforref, $mode = 'next')
{
return $this->getNextValue($objsoc, $objforref, $mode);
}

View File

@ -50,7 +50,7 @@ class mod_facture_terre extends ModeleNumRefFactures
/**
* Constructor
*/
function __construct()
public function __construct()
{
if (! empty($conf->global->INVOICE_NUMBERING_TERRE_FORCE_PREFIX))
{
@ -63,7 +63,7 @@ class mod_facture_terre extends ModeleNumRefFactures
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $langs;
$langs->load("bills");
@ -75,7 +75,7 @@ class mod_facture_terre extends ModeleNumRefFactures
*
* @return string Example
*/
function getExample()
public function getExample()
{
return $this->prefixinvoice."0501-0001";
}
@ -86,7 +86,7 @@ class mod_facture_terre extends ModeleNumRefFactures
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
global $langs,$conf,$db;
@ -167,7 +167,7 @@ class mod_facture_terre extends ModeleNumRefFactures
* @param string $mode 'next' for next value or 'last' for last value
* @return string Value
*/
function getNextValue($objsoc, $invoice, $mode = 'next')
public function getNextValue($objsoc, $invoice, $mode = 'next')
{
global $db;
@ -231,16 +231,16 @@ class mod_facture_terre extends ModeleNumRefFactures
else dol_print_error('', 'Bad parameter for getNextValue');
}
/**
* Return next free value
*
* @param Societe $objsoc Object third party
* @param string $objforref Object for number to search
* @param string $mode 'next' for next value or 'last' for last value
* @return string Next free value
*/
function getNumRef($objsoc, $objforref, $mode = 'next')
{
return $this->getNextValue($objsoc, $objforref, $mode);
}
/**
* Return next free value
*
* @param Societe $objsoc Object third party
* @param string $objforref Object for number to search
* @param string $mode 'next' for next value or 'last' for last value
* @return string Next free value
*/
public function getNumRef($objsoc, $objforref, $mode = 'next')
{
return $this->getNextValue($objsoc, $objforref, $mode);
}
}

View File

@ -42,7 +42,7 @@ abstract class ModelePDFFactures 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 ModelePDFFactures 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;
@ -80,7 +80,7 @@ abstract class ModeleNumRefFactures
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@ -90,7 +90,7 @@ abstract class ModeleNumRefFactures
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $langs;
$langs->load("bills");
@ -102,7 +102,7 @@ abstract class ModeleNumRefFactures
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $langs;
$langs->load("bills");
@ -115,7 +115,7 @@ abstract class ModeleNumRefFactures
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
return true;
}
@ -127,7 +127,7 @@ abstract class ModeleNumRefFactures
* @param Facture $facture Objet facture
* @return string Value
*/
function getNextValue($objsoc, $facture)
public function getNextValue($objsoc, $facture)
{
global $langs;
return $langs->trans("NotAvailable");
@ -138,15 +138,15 @@ abstract class ModeleNumRefFactures
*
* @return string Valeur
*/
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

@ -116,7 +116,7 @@ class pdf_soleil extends ModelePDFFicheinter
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@ -151,7 +151,7 @@ class pdf_soleil extends ModelePDFFicheinter
$this->posxdesc=$this->marge_gauche+1;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@ -163,7 +163,7 @@ class pdf_soleil extends ModelePDFFicheinter
* @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;
@ -338,15 +338,12 @@ class pdf_soleil extends ModelePDFFicheinter
// Description of product line
$curX = $this->posxdesc-1;
// Description of product line
if (empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR))
{
$txt=$outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei, 'dayhour', false, $outputlangs, true);
}
else
{
$txt=$outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei, 'day', false, $outputlangs, true);
}
// Description of product line
if (empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) {
$txt=$outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei, 'dayhour', false, $outputlangs, true);
} else {
$txt=$outputlangs->transnoentities("Date")." : ".dol_print_date($objectligne->datei, 'day', false, $outputlangs, true);
}
if ($objectligne->duration > 0)
{
@ -496,7 +493,7 @@ class pdf_soleil extends ModelePDFFicheinter
* @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;
@ -556,7 +553,7 @@ class pdf_soleil extends ModelePDFFicheinter
* @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;
$default_font_size = pdf_getPDFFontSize($outputlangs);
@ -732,7 +729,7 @@ class pdf_soleil extends ModelePDFFicheinter
* @param int $hidefreetext 1=Hide free text
* @return integer
*/
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

@ -61,7 +61,7 @@ class mod_arctic extends ModeleNumRefFicheinter
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $conf, $langs;
@ -101,7 +101,7 @@ class mod_arctic extends ModeleNumRefFicheinter
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $conf,$langs,$mysoc;
@ -124,7 +124,7 @@ class mod_arctic extends ModeleNumRefFicheinter
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
function getNextValue($objsoc = 0, $object = '')
public function getNextValue($objsoc = 0, $object = '')
{
global $db,$conf;
@ -152,7 +152,7 @@ class mod_arctic extends ModeleNumRefFicheinter
* @param Object $objforref Object for number to search
* @return string Next free value
*/
function getNumRef($objsoc, $objforref)
public function getNumRef($objsoc, $objforref)
{
return $this->getNextValue($objsoc, $objforref);
}

View File

@ -61,7 +61,7 @@ class mod_pacific extends ModeleNumRefFicheinter
*
* @return string Text with description
*/
function info()
public function info()
{
global $langs;
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
@ -72,7 +72,7 @@ class mod_pacific extends ModeleNumRefFicheinter
*
* @return string Example
*/
function getExample()
public function getExample()
{
return $this->prefix."0501-0001";
}
@ -83,7 +83,7 @@ class mod_pacific extends ModeleNumRefFicheinter
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
global $langs,$conf,$db;
@ -122,7 +122,7 @@ class mod_pacific extends ModeleNumRefFicheinter
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
function getNextValue($objsoc = 0, $object = '')
public function getNextValue($objsoc = 0, $object = '')
{
global $db,$conf;
@ -158,7 +158,7 @@ class mod_pacific extends ModeleNumRefFicheinter
* @param Object $objforref Object for number to search
* @return string Next free value
*/
function getNumRef($objsoc, $objforref)
public function getNumRef($objsoc, $objforref)
{
return $this->getNextValue($objsoc, $objforref);
}

View File

@ -40,7 +40,7 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -48,7 +48,7 @@ abstract class ModelePDFFicheinter 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;
@ -79,7 +79,7 @@ abstract class ModeleNumRefFicheinter
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@ -89,7 +89,7 @@ abstract class ModeleNumRefFicheinter
*
* @return string Descriptive text
*/
function info()
public function info()
{
global $langs;
$langs->load("ficheinter");
@ -101,7 +101,7 @@ abstract class ModeleNumRefFicheinter
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $langs;
$langs->load("ficheinter");
@ -114,7 +114,7 @@ abstract class ModeleNumRefFicheinter
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
return true;
}
@ -124,7 +124,7 @@ abstract class ModeleNumRefFicheinter
*
* @return string Value
*/
function getNextValue()
public function getNextValue()
{
global $langs;
return $langs->trans("NotAvailable");
@ -135,21 +135,21 @@ abstract class ModeleNumRefFicheinter
*
* @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");
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Create an intervention document on disk using template defined into FICHEINTER_ADDON_PDF
*

View File

@ -60,9 +60,9 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
*
* @return string text description
*/
function info()
public function info()
{
global $db, $conf, $langs;
global $db, $conf, $langs;
$langs->load("bills");
@ -96,7 +96,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $conf,$langs,$user;
@ -119,7 +119,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
* @param Object $holiday holiday object
* @return string Value if OK, 0 if KO
*/
function getNextValue($user, $holiday)
public function getNextValue($user, $holiday)
{
global $db,$conf;
@ -138,7 +138,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
return $numFinal;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next value
*
@ -146,7 +146,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
* @param Object $objforref Holiday object
* @return string Value if OK, 0 if KO
*/
function holiday_get_num($fuser, $objforref)
public function holiday_get_num($fuser, $objforref)
{
// phpcs:enable
return $this->getNextValue($fuser, $objforref);

View File

@ -62,7 +62,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
*
* @return string text description
*/
function info()
public function info()
{
global $langs;
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
@ -74,7 +74,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
*
* @return string Example
*/
function getExample()
public function getExample()
{
return $this->prefix."0501-0001";
}
@ -85,7 +85,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
*
* @return boolean false if conflit, true if ok
*/
function canBeActivated()
public function canBeActivated()
{
global $conf,$langs,$db;
@ -120,7 +120,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
* @param Object $holiday Holiday object
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $holiday)
public function getNextValue($objsoc, $holiday)
{
global $db,$conf;
@ -154,7 +154,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next value
*
@ -162,7 +162,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
* @param Object $objforref Holiday object
* @return string Value if OK, 0 if KO
*/
function holiday_get_num($fuser, $objforref)
public function holiday_get_num($fuser, $objforref)
{
// phpcs:enable
return $this->getNextValue($fuser, $objforref);

View File

@ -44,7 +44,7 @@ abstract class ModelePDFHoliday extends CommonDocGenerator
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -52,7 +52,7 @@ abstract class ModelePDFHoliday 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;
@ -83,7 +83,7 @@ class ModelNumRefHolidays
*
* @return boolean true if module can be used
*/
function isEnabled()
public function isEnabled()
{
return true;
}
@ -93,7 +93,7 @@ class ModelNumRefHolidays
*
* @return string text description
*/
function info()
public function info()
{
global $langs;
$langs->load("holidays");
@ -105,7 +105,7 @@ class ModelNumRefHolidays
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $langs;
$langs->load("holidays");
@ -117,7 +117,7 @@ class ModelNumRefHolidays
*
* @return boolean false if conflict, true if ok
*/
function canBeActivated()
public function canBeActivated()
{
return true;
}
@ -129,7 +129,7 @@ class ModelNumRefHolidays
* @param Object $contract contract object
* @return string Value
*/
function getNextValue($objsoc, $contract)
public function getNextValue($objsoc, $contract)
{
global $langs;
return $langs->trans("NotAvailable");
@ -140,7 +140,7 @@ class ModelNumRefHolidays
*
* @return string Value
*/
function getVersion()
public function getVersion()
{
global $langs;
$langs->load("admin");
@ -149,6 +149,6 @@ class ModelNumRefHolidays
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");
else return $langs->trans("NotAvailable");
}
}

View File

@ -78,7 +78,7 @@ class doc_generic_project_odt extends ModelePDFProjects
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf, $langs, $mysoc;
@ -117,7 +117,7 @@ class doc_generic_project_odt extends ModelePDFProjects
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -126,7 +126,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param string $array_key Name of the key for return array
* @return array Array of substitution
*/
function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
{
// phpcs:enable
global $conf;
@ -156,7 +156,7 @@ class doc_generic_project_odt extends ModelePDFProjects
return $resarray;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -164,7 +164,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_tasks(Task $task, $outputlangs)
public function get_substitutionarray_tasks(Task $task, $outputlangs)
{
// phpcs:enable
global $conf;
@ -197,7 +197,7 @@ class doc_generic_project_odt extends ModelePDFProjects
return $resarray;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -205,7 +205,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_project_contacts($contact, $outputlangs)
public function get_substitutionarray_project_contacts($contact, $outputlangs)
{
// phpcs:enable
global $conf;
@ -255,7 +255,7 @@ class doc_generic_project_odt extends ModelePDFProjects
return $ret;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -263,19 +263,19 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_project_file($file, $outputlangs)
{
public function get_substitutionarray_project_file($file, $outputlangs)
{
// phpcs:enable
global $conf;
global $conf;
return array(
'projfile_name'=>$file['name'],
'projfile_date'=>dol_print_date($file['date'], 'day'),
'projfile_size'=>$file['size']
);
}
return array(
'projfile_name'=>$file['name'],
'projfile_date'=>dol_print_date($file['date'], 'day'),
'projfile_size'=>$file['size']
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -283,23 +283,23 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_project_reference($refdetail, $outputlangs)
{
public function get_substitutionarray_project_reference($refdetail, $outputlangs)
{
// phpcs:enable
global $conf;
global $conf;
return array(
'projref_type'=>$refdetail['type'],
'projref_ref'=>$refdetail['ref'],
'projref_date'=>dol_print_date($refdetail['date'], 'day'),
'projref_socname'=>$refdetail['socname'],
'projref_amountht'=>price($refdetail['amountht'], 0, $outputlangs),
'projref_amountttc'=>price($refdetail['amountttc'], 0, $outputlangs),
'projref_status'=>$refdetail['status']
);
}
return array(
'projref_type'=>$refdetail['type'],
'projref_ref'=>$refdetail['ref'],
'projref_date'=>dol_print_date($refdetail['date'], 'day'),
'projref_socname'=>$refdetail['socname'],
'projref_amountht'=>price($refdetail['amountht'], 0, $outputlangs),
'projref_amountttc'=>price($refdetail['amountttc'], 0, $outputlangs),
'projref_status'=>$refdetail['status']
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -307,7 +307,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_tasksressource($taskressource, $outputlangs)
public function get_substitutionarray_tasksressource($taskressource, $outputlangs)
{
// phpcs:enable
global $conf;
@ -323,7 +323,7 @@ class doc_generic_project_odt extends ModelePDFProjects
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -331,7 +331,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_taskstime($tasktime, $outputlangs)
public function get_substitutionarray_taskstime($tasktime, $outputlangs)
{
// phpcs:enable
global $conf;
@ -352,7 +352,7 @@ class doc_generic_project_odt extends ModelePDFProjects
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -360,7 +360,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_task_file($file, $outputlangs)
public function get_substitutionarray_task_file($file, $outputlangs)
{
// phpcs:enable
global $conf;
@ -379,7 +379,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $langs Lang object to use for output
* @return string Description
*/
function info($langs)
public function info($langs)
{
global $conf,$langs;
@ -462,7 +462,7 @@ class doc_generic_project_odt extends ModelePDFProjects
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.
*
@ -471,7 +471,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs, $srctemplatepath)
public function write_file($object, $outputlangs, $srctemplatepath)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager;
@ -588,7 +588,7 @@ class doc_generic_project_odt extends ModelePDFProjects
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
$odfHandler = new odf(
$odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->projet->dir_temp,

View File

@ -116,7 +116,7 @@ class pdf_baleine extends ModelePDFProjects
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@ -165,7 +165,7 @@ class pdf_baleine extends ModelePDFProjects
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Fonction generant le projet sur le disque
*
@ -173,7 +173,7 @@ class pdf_baleine extends ModelePDFProjects
* @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs)
public function write_file($object, $outputlangs)
{
// phpcs:enable
global $conf, $hookmanager, $langs, $user;
@ -533,7 +533,7 @@ class pdf_baleine extends ModelePDFProjects
* @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,$mysoc;
@ -580,7 +580,7 @@ class pdf_baleine extends ModelePDFProjects
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf,$mysoc;
@ -665,15 +665,15 @@ class pdf_baleine extends ModelePDFProjects
}
/**
* Show footer of page. Need this->emetteur object
* Show footer of page. Need this->emetteur object
*
* @param PDF $pdf PDF
* @param Project $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return integer
* @param PDF $pdf PDF
* @param Project $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return integer
*/
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

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015-2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -65,7 +65,7 @@ class pdf_beluga extends ModelePDFProjects
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@ -114,7 +114,7 @@ class pdf_beluga extends ModelePDFProjects
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Fonction generant le projet sur le disque
*
@ -122,7 +122,7 @@ class pdf_beluga extends ModelePDFProjects
* @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs)
public function write_file($object, $outputlangs)
{
// phpcs:enable
global $conf, $hookmanager, $langs, $user;
@ -685,7 +685,7 @@ class pdf_beluga extends ModelePDFProjects
* @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,$mysoc;
@ -732,7 +732,7 @@ class pdf_beluga extends ModelePDFProjects
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf,$mysoc;
@ -793,15 +793,15 @@ class pdf_beluga extends ModelePDFProjects
}
/**
* Show footer of page. Need this->emetteur object
* Show footer of page. Need this->emetteur object
*
* @param PDF $pdf PDF
* @param Project $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return integer
* @param PDF $pdf PDF
* @param Project $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return integer
*/
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

@ -48,7 +48,7 @@ class pdf_timespent extends ModelePDFProjects
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@ -97,7 +97,7 @@ class pdf_timespent extends ModelePDFProjects
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Fonction generant le projet sur le disque
*
@ -105,7 +105,7 @@ class pdf_timespent extends ModelePDFProjects
* @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs)
public function write_file($object, $outputlangs)
{
// phpcs:enable
global $conf, $hookmanager, $langs, $user;
@ -464,7 +464,7 @@ class pdf_timespent extends ModelePDFProjects
* @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,$mysoc;
@ -511,7 +511,7 @@ class pdf_timespent extends ModelePDFProjects
* @param Translate $outputlangs Object lang for output
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs,$conf,$mysoc;
@ -595,19 +595,19 @@ class pdf_timespent extends ModelePDFProjects
*/
}
/**
* Show footer of page. Need this->emetteur object
/**
* Show footer of page. Need this->emetteur object
*
* @param PDF $pdf PDF
* @param Project $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return integer
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
}
* @param PDF $pdf PDF
* @param Project $object Object to show
* @param Translate $outputlangs Object lang for output
* @param int $hidefreetext 1=Hide free text
* @return integer
*/
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
return pdf_pagefoot($pdf, $outputlangs, 'PROJECT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
}
}

View File

@ -62,7 +62,7 @@ class mod_project_simple extends ModeleNumRefProjects
*
* @return string Text with description
*/
function info()
public function info()
{
global $langs;
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
@ -74,7 +74,7 @@ class mod_project_simple extends ModeleNumRefProjects
*
* @return string Example
*/
function getExample()
public function getExample()
{
return $this->prefix."0501-0001";
}
@ -85,7 +85,7 @@ class mod_project_simple extends ModeleNumRefProjects
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
global $conf,$langs,$db;
@ -122,7 +122,7 @@ class mod_project_simple extends ModeleNumRefProjects
* @param Project $project Object project
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $project)
public function getNextValue($objsoc, $project)
{
global $db,$conf;
@ -159,7 +159,7 @@ class mod_project_simple extends ModeleNumRefProjects
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next reference not yet used as a reference
*
@ -167,7 +167,7 @@ class mod_project_simple extends ModeleNumRefProjects
* @param Project $project Object project
* @return string Next not used reference
*/
function project_get_num($objsoc = 0, $project = '')
public function project_get_num($objsoc = 0, $project = '')
{
// phpcs:enable
return $this->getNextValue($objsoc, $project);

View File

@ -59,7 +59,7 @@ class mod_project_universal extends ModeleNumRefProjects
*
* @return string Texte descripif
*/
function info()
public function info()
{
global $conf, $langs;
@ -100,7 +100,7 @@ class mod_project_universal extends ModeleNumRefProjects
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $conf,$langs,$mysoc;
@ -123,7 +123,7 @@ class mod_project_universal extends ModeleNumRefProjects
* @param Project $project Object project
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $project)
public function getNextValue($objsoc, $project)
{
global $db,$conf;
@ -145,7 +145,7 @@ class mod_project_universal extends ModeleNumRefProjects
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next reference not yet used as a reference
*
@ -153,7 +153,7 @@ class mod_project_universal extends ModeleNumRefProjects
* @param Project $project Object project
* @return string Next not used reference
*/
function project_get_num($objsoc = 0, $project = '')
public function project_get_num($objsoc = 0, $project = '')
{
// phpcs:enable
return $this->getNextValue($objsoc, $project);

View File

@ -37,7 +37,7 @@ abstract class ModelePDFProjects extends CommonDocGenerator
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -45,7 +45,7 @@ abstract class ModelePDFProjects 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;
@ -136,14 +136,14 @@ abstract class ModeleNumRefProjects
* @return string Valeur
*/
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

@ -62,7 +62,7 @@ class doc_generic_task_odt extends ModelePDFTask
public $emetteur;
/**
* @var array() Minimum version of PHP required by module.
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
@ -79,7 +79,7 @@ class doc_generic_task_odt extends ModelePDFTask
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf, $langs, $mysoc;
@ -118,7 +118,7 @@ class doc_generic_task_odt extends ModelePDFTask
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -127,7 +127,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param string $array_key Name of the key for return array
* @return array Array of substitution
*/
function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
{
// phpcs:enable
global $conf;
@ -163,7 +163,7 @@ class doc_generic_task_odt extends ModelePDFTask
return $resarray;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -171,30 +171,30 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_tasks($task, $outputlangs)
{
public function get_substitutionarray_tasks($task, $outputlangs)
{
// phpcs:enable
global $conf;
global $conf;
return array(
'task_ref'=>$task->ref,
'task_fk_project'=>$task->fk_project,
'task_projectref'=>$task->projectref,
'task_projectlabel'=>$task->projectlabel,
'task_label'=>$task->label,
'task_description'=>$task->description,
'task_fk_parent'=>$task->fk_parent,
'task_duration'=>$task->duration,
'task_progress'=>$task->progress,
'task_public'=>$task->public,
'task_date_start'=>dol_print_date($task->date_start, 'day'),
'task_date_end'=>dol_print_date($task->date_end, 'day'),
'task_note_private'=>$task->note_private,
'task_note_public'=>$task->note_public
);
}
return array(
'task_ref'=>$task->ref,
'task_fk_project'=>$task->fk_project,
'task_projectref'=>$task->projectref,
'task_projectlabel'=>$task->projectlabel,
'task_label'=>$task->label,
'task_description'=>$task->description,
'task_fk_parent'=>$task->fk_parent,
'task_duration'=>$task->duration,
'task_progress'=>$task->progress,
'task_public'=>$task->public,
'task_date_start'=>dol_print_date($task->date_start, 'day'),
'task_date_end'=>dol_print_date($task->date_end, 'day'),
'task_note_private'=>$task->note_private,
'task_note_public'=>$task->note_public
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -202,7 +202,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_project_contacts($contact, $outputlangs)
public function get_substitutionarray_project_contacts($contact, $outputlangs)
{
// phpcs:enable
global $conf;
@ -219,7 +219,7 @@ class doc_generic_task_odt extends ModelePDFTask
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -227,7 +227,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_project_file($file, $outputlangs)
public function get_substitutionarray_project_file($file, $outputlangs)
{
// phpcs:enable
global $conf;
@ -239,7 +239,7 @@ class doc_generic_task_odt extends ModelePDFTask
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -247,7 +247,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_project_reference($refdetail, $outputlangs)
public function get_substitutionarray_project_reference($refdetail, $outputlangs)
{
// phpcs:enable
global $conf;
@ -263,7 +263,7 @@ class doc_generic_task_odt extends ModelePDFTask
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -271,7 +271,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_tasksressource($taskressource, $outputlangs)
public function get_substitutionarray_tasksressource($taskressource, $outputlangs)
{
// phpcs:enable
global $conf;
@ -287,7 +287,7 @@ class doc_generic_task_odt extends ModelePDFTask
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -295,7 +295,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_taskstime($tasktime, $outputlangs)
public function get_substitutionarray_taskstime($tasktime, $outputlangs)
{
// phpcs:enable
global $conf;
@ -312,7 +312,7 @@ class doc_generic_task_odt extends ModelePDFTask
);
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Define array with couple substitution key => substitution value
*
@ -320,7 +320,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
function get_substitutionarray_task_file($file, $outputlangs)
public function get_substitutionarray_task_file($file, $outputlangs)
{
// phpcs:enable
global $conf;
@ -339,7 +339,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $langs Lang object to use for output
* @return string Description
*/
function info($langs)
public function info($langs)
{
global $conf,$langs;
@ -422,7 +422,7 @@ class doc_generic_task_odt extends ModelePDFTask
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.
*
@ -431,7 +431,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @return int 1 if OK, <=0 if KO
*/
function write_file($object, $outputlangs, $srctemplatepath)
public function write_file($object, $outputlangs, $srctemplatepath)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager;
@ -515,7 +515,7 @@ class doc_generic_task_odt extends ModelePDFTask
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
$odfHandler = new odf(
$odfHandler = new odf(
$srctemplatepath,
array(
'PATH_TO_TMP' => $conf->projet->dir_temp,

View File

@ -62,7 +62,7 @@ class mod_task_simple extends ModeleNumRefTask
*
* @return string Text with description
*/
function info()
public function info()
{
global $langs;
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
@ -74,7 +74,7 @@ class mod_task_simple extends ModeleNumRefTask
*
* @return string Example
*/
function getExample()
public function getExample()
{
return $this->prefix."0501-0001";
}
@ -85,7 +85,7 @@ class mod_task_simple extends ModeleNumRefTask
*
* @return boolean false si conflit, true si ok
*/
function canBeActivated()
public function canBeActivated()
{
global $conf,$langs,$db;
@ -123,7 +123,7 @@ class mod_task_simple extends ModeleNumRefTask
* @param Task $object Object Task
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $object)
public function getNextValue($objsoc, $object)
{
global $db,$conf;
@ -159,7 +159,7 @@ class mod_task_simple extends ModeleNumRefTask
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next reference not yet used as a reference
*
@ -167,7 +167,7 @@ class mod_task_simple extends ModeleNumRefTask
* @param Task $object Object task
* @return string Next not used reference
*/
function task_get_num($objsoc = 0, $object = '')
public function task_get_num($objsoc = 0, $object = '')
{
return $this->getNextValue($objsoc, $object);
}

View File

@ -100,7 +100,7 @@ class mod_task_universal extends ModeleNumRefTask
*
* @return string Example
*/
function getExample()
public function getExample()
{
global $conf,$langs,$mysoc;
@ -123,7 +123,7 @@ class mod_task_universal extends ModeleNumRefTask
* @param Task $object Object task
* @return string Value if OK, 0 if KO
*/
function getNextValue($objsoc, $object)
public function getNextValue($objsoc, $object)
{
global $db,$conf;
@ -145,7 +145,7 @@ class mod_task_universal extends ModeleNumRefTask
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next reference not yet used as a reference
*
@ -153,7 +153,7 @@ class mod_task_universal extends ModeleNumRefTask
* @param Task $object Object task
* @return string Next not used reference
*/
function project_get_num($objsoc = 0, $object = '')
public function project_get_num($objsoc = 0, $object = '')
{
// phpcs:enable
return $this->getNextValue($objsoc, $object);

View File

@ -38,7 +38,7 @@ abstract class ModelePDFTask extends CommonDocGenerator
public $error='';
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
@ -46,7 +46,7 @@ abstract class ModelePDFTask 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;