Skip to content

Commit

Permalink
PSR2.Classes.PropertyDeclaration.VarUsed
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Mar 5, 2019
1 parent cfd39a1 commit 2745f98
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 59 deletions.
1 change: 1 addition & 0 deletions dev/setup/codesniffer/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -428,4 +428,5 @@
<rule ref="PSR2.Files.EndFileNewline.TooMany" />
<rule ref="PSR2.Files.EndFileNewline.NoneFound" />
<rule ref="PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket" />
<rule ref="PSR2.Classes.PropertyDeclaration.VarUsed" />
</ruleset>
88 changes: 44 additions & 44 deletions htdocs/comm/propal/class/propal.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3526,13 +3526,13 @@ public function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notoo
if ($option == '') {
$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;
}
if ($option == 'expedition') {
elseif ($option == 'expedition') {
$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;
}

Expand Down Expand Up @@ -3646,68 +3646,68 @@ class PropaleLigne extends CommonObjectLine
*/
public $table_element='propaldet';

var $oldline;
public $oldline;

// From llx_propaldet
var $fk_propal;
var $fk_parent_line;
var $desc; // Description ligne
var $fk_product; // Id produit predefini
public $fk_propal;
public $fk_parent_line;
public $desc; // Description ligne
public $fk_product; // Id produit predefini
/**
* @deprecated
* @see product_type
*/
var $fk_product_type;
public $fk_product_type;
/**
* Product type.
* @var int
* @see Product::TYPE_PRODUCT, Product::TYPE_SERVICE
*/
var $product_type = Product::TYPE_PRODUCT;
public $product_type = Product::TYPE_PRODUCT;

var $qty;
var $tva_tx;
var $subprice;
var $remise_percent;
var $fk_remise_except;
public $qty;
public $tva_tx;
public $subprice;
public $remise_percent;
public $fk_remise_except;

var $rang = 0;
public $rang = 0;

var $fk_fournprice;
var $pa_ht;
var $marge_tx;
var $marque_tx;
public $fk_fournprice;
public $pa_ht;
public $marge_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
// 2: ecotaxe
// 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 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
var $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_ht; // Total HT 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
public $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne

/**
* @deprecated
* @see $remise_percent, $fk_remise_except
*/
var $remise;
public $remise;
/**
* @deprecated
* @see subprice
*/
var $price;
public $price;

// From llx_product
/**
* @deprecated
* @see product_ref
*/
var $ref;
public $ref;
/**
* Product reference
* @var string
Expand All @@ -3717,7 +3717,7 @@ class PropaleLigne extends CommonObjectLine
* @deprecated
* @see product_label
*/
var $libelle;
public $libelle;
/**
* Product label
* @var string
Expand All @@ -3729,25 +3729,25 @@ class PropaleLigne extends CommonObjectLine
*/
public $product_desc;

var $localtax1_tx; // Local tax 1
var $localtax2_tx; // Local tax 2
var $localtax1_type; // Local tax 1 type
var $localtax2_type; // Local tax 2 type
var $total_localtax1; // Line total local tax 1
var $total_localtax2; // Line total local tax 2
public $localtax1_tx; // Local tax 1
public $localtax2_tx; // Local tax 2
public $localtax1_type; // Local tax 1 type
public $localtax2_type; // Local tax 2 type
public $total_localtax1; // Line total local tax 1
public $total_localtax2; // Line total local tax 2

var $date_start;
var $date_end;
public $date_start;
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
var $fk_multicurrency;
var $multicurrency_code;
var $multicurrency_subprice;
var $multicurrency_total_ht;
var $multicurrency_total_tva;
var $multicurrency_total_ttc;
public $fk_multicurrency;
public $multicurrency_code;
public $multicurrency_subprice;
public $multicurrency_total_ht;
public $multicurrency_total_tva;
public $multicurrency_total_ttc;

/**
* Class line Contructor
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/commonorder.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ abstract class CommonOrderLine extends CommonObjectLine
* @deprecated
* @see subprice
*/
var $price;
public $price;

/**
* Unit price before taxes
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/class/stats.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
*/
abstract class Stats
{
protected $db;
var $_lastfetchdate=array(); // Dates of cache file read by methods
var $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts)
protected $db;
private $_lastfetchdate=array(); // Dates of cache file read by methods
public $cachefilesuffix=''; // Suffix to add to name of cache file (to avoid file name conflicts)

/**
* Return nb of elements by month for several years
Expand Down
6 changes: 3 additions & 3 deletions htdocs/core/modules/syslog/mod_syslog_chromephp.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
class mod_syslog_chromephp extends LogHandler implements LogHandlerInterface
{
var $code = 'chromephp';
public $code = 'chromephp';

/**
* Return name of logger
Expand Down Expand Up @@ -50,7 +50,7 @@ public function getWarning()

return ($this->isActive() == 1)?'':$langs->trans('ClassNotFoundIntoPathWarning', 'ChromePhp.class.php');
}

/**
* Is the module active ?
*
Expand Down Expand Up @@ -159,7 +159,7 @@ public function export($content)
$res = @include_once 'ChromePhp.php';
if (! $res) $res=@include_once 'ChromePhp.class.php';
set_include_path($oldinclude);

ob_start(); // To be sure headers are not flushed until all page is completely processed
if ($content['level'] == LOG_ERR) ChromePhp::error($content['message']);
elseif ($content['level'] == LOG_WARNING) ChromePhp::warn($content['message']);
Expand Down
4 changes: 2 additions & 2 deletions htdocs/core/modules/syslog/mod_syslog_file.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*/
class mod_syslog_file extends LogHandler implements LogHandlerInterface
{
var $code = 'file';
var $lastTime = 0;
public $code = 'file';
public $lastTime = 0;

/**
* Return name of logger
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/syslog/mod_syslog_syslog.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
{
var $code = 'syslog';
public $code = 'syslog';

/**
* Return name of logger
Expand Down
10 changes: 5 additions & 5 deletions htdocs/expensereport/class/expensereportstats.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class ExpenseReportStats extends Stats
*/
public $table_element;

var $socid;
var $userid;
public $socid;
public $userid;

var $from;
var $field;
var $where;
public $from;
public $field;
public $where;

/**
* Constructor
Expand Down

0 comments on commit 2745f98

Please sign in to comment.