PSR2 Fixes

This commit is contained in:
Progi1984 2015-05-17 20:00:00 +02:00
parent 004d411772
commit 066a85d3d2
10 changed files with 46 additions and 46 deletions

View File

@ -27,7 +27,6 @@
*/ */
class PHPExcel_Cell class PHPExcel_Cell
{ {
/** /**
* Default range variable constant * Default range variable constant
* *
@ -227,6 +226,7 @@ class PHPExcel_Cell
break; break;
case PHPExcel_Cell_DataType::TYPE_STRING2: case PHPExcel_Cell_DataType::TYPE_STRING2:
$pDataType = PHPExcel_Cell_DataType::TYPE_STRING; $pDataType = PHPExcel_Cell_DataType::TYPE_STRING;
// no break
case PHPExcel_Cell_DataType::TYPE_STRING: case PHPExcel_Cell_DataType::TYPE_STRING:
// Synonym for string // Synonym for string
case PHPExcel_Cell_DataType::TYPE_INLINE: case PHPExcel_Cell_DataType::TYPE_INLINE:

View File

@ -35,9 +35,9 @@
class PHPExcel_Reader_Excel5_RC4 class PHPExcel_Reader_Excel5_RC4
{ {
// Context // Context
var $s = array(); protected $s = array();
var $i = 0; protected $i = 0;
var $j = 0; protected $j = 0;
/** /**
* RC4 stream decryption/encryption constrcutor * RC4 stream decryption/encryption constrcutor

View File

@ -131,7 +131,7 @@ class PHPExcel_Shared_ZipStreamWrapper
* @param int $count maximum number of bytes to read * @param int $count maximum number of bytes to read
* @return string * @return string
*/ */
function stream_read($count) public function stream_read($count)
{ {
$ret = substr($this->_data, $this->_position, $count); $ret = substr($this->_data, $this->_position, $count);
$this->_position += strlen($ret); $this->_position += strlen($ret);

View File

@ -138,7 +138,7 @@ class PHPExcel_Exponential_Best_Fit extends PHPExcel_Best_Fit
* @param float[] $xValues The set of X-values for this regression * @param float[] $xValues The set of X-values for this regression
* @param boolean $const * @param boolean $const
*/ */
function __construct($yValues, $xValues = array(), $const = true) public function __construct($yValues, $xValues = array(), $const = true)
{ {
if (parent::__construct($yValues, $xValues) !== false) { if (parent::__construct($yValues, $xValues) !== false) {
$this->_exponential_regression($yValues, $xValues, $const); $this->_exponential_regression($yValues, $xValues, $const);

View File

@ -100,7 +100,7 @@ class PHPExcel_Linear_Best_Fit extends PHPExcel_Best_Fit
* @param float[] $xValues The set of X-values for this regression * @param float[] $xValues The set of X-values for this regression
* @param boolean $const * @param boolean $const
*/ */
function __construct($yValues, $xValues = array(), $const = true) public function __construct($yValues, $xValues = array(), $const = true)
{ {
if (parent::__construct($yValues, $xValues) !== false) { if (parent::__construct($yValues, $xValues) !== false) {
$this->_linear_regression($yValues, $xValues, $const); $this->_linear_regression($yValues, $xValues, $const);

View File

@ -108,7 +108,7 @@ class PHPExcel_Logarithmic_Best_Fit extends PHPExcel_Best_Fit
* @param float[] $xValues The set of X-values for this regression * @param float[] $xValues The set of X-values for this regression
* @param boolean $const * @param boolean $const
*/ */
function __construct($yValues, $xValues = array(), $const = true) public function __construct($yValues, $xValues = array(), $const = true)
{ {
if (parent::__construct($yValues, $xValues) !== false) { if (parent::__construct($yValues, $xValues) !== false) {
$this->_logarithmic_regression($yValues, $xValues, $const); $this->_logarithmic_regression($yValues, $xValues, $const);

View File

@ -213,7 +213,7 @@ class PHPExcel_Polynomial_Best_Fit extends PHPExcel_Best_Fit
* @param float[] $xValues The set of X-values for this regression * @param float[] $xValues The set of X-values for this regression
* @param boolean $const * @param boolean $const
*/ */
function __construct($order, $yValues, $xValues = array(), $const = true) public function __construct($order, $yValues, $xValues = array(), $const = true)
{ {
if (parent::__construct($yValues, $xValues) !== false) { if (parent::__construct($yValues, $xValues) !== false) {
if ($order < $this->_valueCount) { if ($order < $this->_valueCount) {

View File

@ -138,7 +138,7 @@ class PHPExcel_Power_Best_Fit extends PHPExcel_Best_Fit
* @param float[] $xValues The set of X-values for this regression * @param float[] $xValues The set of X-values for this regression
* @param boolean $const * @param boolean $const
*/ */
function __construct($yValues, $xValues = array(), $const = true) public function __construct($yValues, $xValues = array(), $const = true)
{ {
if (parent::__construct($yValues, $xValues) !== false) { if (parent::__construct($yValues, $xValues) !== false) {
$this->_power_regression($yValues, $xValues, $const); $this->_power_regression($yValues, $xValues, $const);

View File

@ -153,4 +153,4 @@ class trendClass
return false; return false;
} }
} // function calculate() } // function calculate()
} // class trendClass }

View File

@ -166,7 +166,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function isProtectionEnabled() public function isProtectionEnabled()
{ {
return $this->_sheet || return $this->_sheet ||
$this->_objects || $this->_objects ||
@ -191,7 +191,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getSheet() public function getSheet()
{ {
return $this->_sheet; return $this->_sheet;
} }
@ -202,7 +202,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setSheet($pValue = false) public function setSheet($pValue = false)
{ {
$this->_sheet = $pValue; $this->_sheet = $pValue;
return $this; return $this;
@ -213,7 +213,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getObjects() public function getObjects()
{ {
return $this->_objects; return $this->_objects;
} }
@ -224,7 +224,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setObjects($pValue = false) public function setObjects($pValue = false)
{ {
$this->_objects = $pValue; $this->_objects = $pValue;
return $this; return $this;
@ -235,7 +235,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getScenarios() public function getScenarios()
{ {
return $this->_scenarios; return $this->_scenarios;
} }
@ -246,7 +246,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setScenarios($pValue = false) public function setScenarios($pValue = false)
{ {
$this->_scenarios = $pValue; $this->_scenarios = $pValue;
return $this; return $this;
@ -257,7 +257,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getFormatCells() public function getFormatCells()
{ {
return $this->_formatCells; return $this->_formatCells;
} }
@ -268,7 +268,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setFormatCells($pValue = false) public function setFormatCells($pValue = false)
{ {
$this->_formatCells = $pValue; $this->_formatCells = $pValue;
return $this; return $this;
@ -279,7 +279,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getFormatColumns() public function getFormatColumns()
{ {
return $this->_formatColumns; return $this->_formatColumns;
} }
@ -290,7 +290,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setFormatColumns($pValue = false) public function setFormatColumns($pValue = false)
{ {
$this->_formatColumns = $pValue; $this->_formatColumns = $pValue;
return $this; return $this;
@ -301,7 +301,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getFormatRows() public function getFormatRows()
{ {
return $this->_formatRows; return $this->_formatRows;
} }
@ -312,7 +312,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setFormatRows($pValue = false) public function setFormatRows($pValue = false)
{ {
$this->_formatRows = $pValue; $this->_formatRows = $pValue;
return $this; return $this;
@ -323,7 +323,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getInsertColumns() public function getInsertColumns()
{ {
return $this->_insertColumns; return $this->_insertColumns;
} }
@ -334,7 +334,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setInsertColumns($pValue = false) public function setInsertColumns($pValue = false)
{ {
$this->_insertColumns = $pValue; $this->_insertColumns = $pValue;
return $this; return $this;
@ -345,7 +345,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getInsertRows() public function getInsertRows()
{ {
return $this->_insertRows; return $this->_insertRows;
} }
@ -356,7 +356,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setInsertRows($pValue = false) public function setInsertRows($pValue = false)
{ {
$this->_insertRows = $pValue; $this->_insertRows = $pValue;
return $this; return $this;
@ -367,7 +367,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getInsertHyperlinks() public function getInsertHyperlinks()
{ {
return $this->_insertHyperlinks; return $this->_insertHyperlinks;
} }
@ -378,7 +378,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setInsertHyperlinks($pValue = false) public function setInsertHyperlinks($pValue = false)
{ {
$this->_insertHyperlinks = $pValue; $this->_insertHyperlinks = $pValue;
return $this; return $this;
@ -389,7 +389,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getDeleteColumns() public function getDeleteColumns()
{ {
return $this->_deleteColumns; return $this->_deleteColumns;
} }
@ -400,7 +400,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setDeleteColumns($pValue = false) public function setDeleteColumns($pValue = false)
{ {
$this->_deleteColumns = $pValue; $this->_deleteColumns = $pValue;
return $this; return $this;
@ -411,7 +411,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getDeleteRows() public function getDeleteRows()
{ {
return $this->_deleteRows; return $this->_deleteRows;
} }
@ -422,7 +422,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setDeleteRows($pValue = false) public function setDeleteRows($pValue = false)
{ {
$this->_deleteRows = $pValue; $this->_deleteRows = $pValue;
return $this; return $this;
@ -433,7 +433,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getSelectLockedCells() public function getSelectLockedCells()
{ {
return $this->_selectLockedCells; return $this->_selectLockedCells;
} }
@ -444,7 +444,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setSelectLockedCells($pValue = false) public function setSelectLockedCells($pValue = false)
{ {
$this->_selectLockedCells = $pValue; $this->_selectLockedCells = $pValue;
return $this; return $this;
@ -455,7 +455,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getSort() public function getSort()
{ {
return $this->_sort; return $this->_sort;
} }
@ -466,7 +466,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setSort($pValue = false) public function setSort($pValue = false)
{ {
$this->_sort = $pValue; $this->_sort = $pValue;
return $this; return $this;
@ -477,7 +477,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getAutoFilter() public function getAutoFilter()
{ {
return $this->_autoFilter; return $this->_autoFilter;
} }
@ -488,7 +488,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setAutoFilter($pValue = false) public function setAutoFilter($pValue = false)
{ {
$this->_autoFilter = $pValue; $this->_autoFilter = $pValue;
return $this; return $this;
@ -499,7 +499,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getPivotTables() public function getPivotTables()
{ {
return $this->_pivotTables; return $this->_pivotTables;
} }
@ -510,7 +510,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setPivotTables($pValue = false) public function setPivotTables($pValue = false)
{ {
$this->_pivotTables = $pValue; $this->_pivotTables = $pValue;
return $this; return $this;
@ -521,7 +521,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return boolean * @return boolean
*/ */
function getSelectUnlockedCells() public function getSelectUnlockedCells()
{ {
return $this->_selectUnlockedCells; return $this->_selectUnlockedCells;
} }
@ -532,7 +532,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pValue * @param boolean $pValue
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setSelectUnlockedCells($pValue = false) public function setSelectUnlockedCells($pValue = false)
{ {
$this->_selectUnlockedCells = $pValue; $this->_selectUnlockedCells = $pValue;
return $this; return $this;
@ -543,7 +543,7 @@ class PHPExcel_Worksheet_Protection
* *
* @return string * @return string
*/ */
function getPassword() public function getPassword()
{ {
return $this->_password; return $this->_password;
} }
@ -555,7 +555,7 @@ class PHPExcel_Worksheet_Protection
* @param boolean $pAlreadyHashed If the password has already been hashed, set this to true * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true
* @return PHPExcel_Worksheet_Protection * @return PHPExcel_Worksheet_Protection
*/ */
function setPassword($pValue = '', $pAlreadyHashed = false) public function setPassword($pValue = '', $pAlreadyHashed = false)
{ {
if (!$pAlreadyHashed) { if (!$pAlreadyHashed) {
$pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue); $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue);