Merge pull request #10749 from frederic34/PSR2.Classes.PropertyDeclaration.VarUsed

PSR2.Classes.PropertyDeclaration.VarUsed
This commit is contained in:
Laurent Destailleur 2019-03-07 12:49:13 +01:00 committed by GitHub
commit daaa4ca0c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 60 additions and 59 deletions

View File

@ -428,4 +428,5 @@
<rule ref="PSR2.Files.EndFileNewline.TooMany" /> <rule ref="PSR2.Files.EndFileNewline.TooMany" />
<rule ref="PSR2.Files.EndFileNewline.NoneFound" /> <rule ref="PSR2.Files.EndFileNewline.NoneFound" />
<rule ref="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket" /> <rule ref="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket" />
<rule ref="PSR2.Classes.PropertyDeclaration.VarUsed" />
</ruleset> </ruleset>

View File

@ -3526,13 +3526,13 @@ class Propal extends CommonObject
if ($option == '') { if ($option == '') {
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id. $get_params; $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id. $get_params;
} }
if ($option == 'compta') { // deprecated elseif ($option == 'compta') { // deprecated
$url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id. $get_params; $url = DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id. $get_params;
} }
if ($option == 'expedition') { elseif ($option == 'expedition') {
$url = DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id. $get_params; $url = DOL_URL_ROOT.'/expedition/propal.php?id='.$this->id. $get_params;
} }
if ($option == 'document') { elseif ($option == 'document') {
$url = DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params; $url = DOL_URL_ROOT.'/comm/propal/document.php?id='.$this->id. $get_params;
} }
@ -3646,68 +3646,68 @@ class PropaleLigne extends CommonObjectLine
*/ */
public $table_element='propaldet'; public $table_element='propaldet';
var $oldline; public $oldline;
// From llx_propaldet // From llx_propaldet
var $fk_propal; public $fk_propal;
var $fk_parent_line; public $fk_parent_line;
var $desc; // Description ligne public $desc; // Description ligne
var $fk_product; // Id produit predefini public $fk_product; // Id produit predefini
/** /**
* @deprecated * @deprecated
* @see product_type * @see product_type
*/ */
var $fk_product_type; public $fk_product_type;
/** /**
* Product type. * Product type.
* @var int * @var int
* @see Product::TYPE_PRODUCT, Product::TYPE_SERVICE * @see Product::TYPE_PRODUCT, Product::TYPE_SERVICE
*/ */
var $product_type = Product::TYPE_PRODUCT; public $product_type = Product::TYPE_PRODUCT;
var $qty; public $qty;
var $tva_tx; public $tva_tx;
var $subprice; public $subprice;
var $remise_percent; public $remise_percent;
var $fk_remise_except; public $fk_remise_except;
var $rang = 0; public $rang = 0;
var $fk_fournprice; public $fk_fournprice;
var $pa_ht; public $pa_ht;
var $marge_tx; public $marge_tx;
var $marque_tx; public $marque_tx;
var $special_code; // Tag for special lines (exlusive tags) public $special_code; // Tag for special lines (exlusive tags)
// 1: frais de port // 1: frais de port
// 2: ecotaxe // 2: ecotaxe
// 3: option line (when qty = 0) // 3: option line (when qty = 0)
var $info_bits = 0; // Liste d'options cumulables: public $info_bits = 0; // Liste d'options cumulables:
// Bit 0: 0 si TVA normal - 1 si TVA NPR // Bit 0: 0 si TVA normal - 1 si TVA NPR
// Bit 1: 0 ligne normale - 1 si ligne de remise fixe // Bit 1: 0 ligne normale - 1 si ligne de remise fixe
var $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne public $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne
var $total_tva; // Total TVA de la ligne toute quantite et incluant la remise ligne public $total_tva; // Total TVA de la ligne toute quantite et incluant la remise ligne
var $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne public $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne
/** /**
* @deprecated * @deprecated
* @see $remise_percent, $fk_remise_except * @see $remise_percent, $fk_remise_except
*/ */
var $remise; public $remise;
/** /**
* @deprecated * @deprecated
* @see subprice * @see subprice
*/ */
var $price; public $price;
// From llx_product // From llx_product
/** /**
* @deprecated * @deprecated
* @see product_ref * @see product_ref
*/ */
var $ref; public $ref;
/** /**
* Product reference * Product reference
* @var string * @var string
@ -3717,7 +3717,7 @@ class PropaleLigne extends CommonObjectLine
* @deprecated * @deprecated
* @see product_label * @see product_label
*/ */
var $libelle; public $libelle;
/** /**
* Product label * Product label
* @var string * @var string
@ -3729,25 +3729,25 @@ class PropaleLigne extends CommonObjectLine
*/ */
public $product_desc; public $product_desc;
var $localtax1_tx; // Local tax 1 public $localtax1_tx; // Local tax 1
var $localtax2_tx; // Local tax 2 public $localtax2_tx; // Local tax 2
var $localtax1_type; // Local tax 1 type public $localtax1_type; // Local tax 1 type
var $localtax2_type; // Local tax 2 type public $localtax2_type; // Local tax 2 type
var $total_localtax1; // Line total local tax 1 public $total_localtax1; // Line total local tax 1
var $total_localtax2; // Line total local tax 2 public $total_localtax2; // Line total local tax 2
var $date_start; public $date_start;
var $date_end; public $date_end;
var $skip_update_total; // Skip update price total for special lines public $skip_update_total; // Skip update price total for special lines
// Multicurrency // Multicurrency
var $fk_multicurrency; public $fk_multicurrency;
var $multicurrency_code; public $multicurrency_code;
var $multicurrency_subprice; public $multicurrency_subprice;
var $multicurrency_total_ht; public $multicurrency_total_ht;
var $multicurrency_total_tva; public $multicurrency_total_tva;
var $multicurrency_total_ttc; public $multicurrency_total_ttc;
/** /**
* Class line Contructor * Class line Contructor

View File

@ -82,7 +82,7 @@ abstract class CommonOrderLine extends CommonObjectLine
* @deprecated * @deprecated
* @see subprice * @see subprice
*/ */
var $price; public $price;
/** /**
* Unit price before taxes * Unit price before taxes

View File

@ -29,9 +29,9 @@
*/ */
abstract class Stats abstract class Stats
{ {
protected $db; protected $db;
var $_lastfetchdate=array(); // Dates of cache file read by methods private $_lastfetchdate=array(); // Dates of cache file read by methods
var $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts) public $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts)
/** /**
* Return nb of elements by month for several years * Return nb of elements by month for several years

View File

@ -7,7 +7,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
*/ */
class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
{ {
var $code = 'chromephp'; public $code = 'chromephp';
/** /**
* Return name of logger * Return name of logger
@ -50,7 +50,7 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
return ($this->isActive() == 1)?'':$langs->trans('ClassNotFoundIntoPathWarning', 'ChromePhp.class.php'); return ($this->isActive() == 1)?'':$langs->trans('ClassNotFoundIntoPathWarning', 'ChromePhp.class.php');
} }
/** /**
* Is the module active ? * Is the module active ?
* *
@ -159,7 +159,7 @@ class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
$res = @include_once 'ChromePhp.php'; $res = @include_once 'ChromePhp.php';
if (! $res) $res=@include_once 'ChromePhp.class.php'; if (! $res) $res=@include_once 'ChromePhp.class.php';
set_include_path($oldinclude); set_include_path($oldinclude);
ob_start(); // To be sure headers are not flushed until all page is completely processed ob_start(); // To be sure headers are not flushed until all page is completely processed
if ($content['level'] == LOG_ERR) ChromePhp::error($content['message']); if ($content['level'] == LOG_ERR) ChromePhp::error($content['message']);
elseif ($content['level'] == LOG_WARNING) ChromePhp::warn($content['message']); elseif ($content['level'] == LOG_WARNING) ChromePhp::warn($content['message']);

View File

@ -7,8 +7,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
*/ */
class mod_syslog_file extends LogHandler implements LogHandlerInterface class mod_syslog_file extends LogHandler implements LogHandlerInterface
{ {
var $code = 'file'; public $code = 'file';
var $lastTime = 0; public $lastTime = 0;
/** /**
* Return name of logger * Return name of logger

View File

@ -7,7 +7,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
*/ */
class mod_syslog_syslog extends LogHandler implements LogHandlerInterface class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
{ {
var $code = 'syslog'; public $code = 'syslog';
/** /**
* Return name of logger * Return name of logger

View File

@ -35,12 +35,12 @@ class ExpenseReportStats extends Stats
*/ */
public $table_element; public $table_element;
var $socid; public $socid;
var $userid; public $userid;
var $from; public $from;
var $field; public $field;
var $where; public $where;
/** /**
* Constructor * Constructor