PSR-2 : Fixes
This commit is contained in:
parent
2896d62e08
commit
5bb747f8cc
|
@ -191,7 +191,8 @@ class PHPExcel_Cell_DataValidation
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFormula2() {
|
||||
public function getFormula2()
|
||||
{
|
||||
return $this->formula2;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,9 +176,7 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
* @param string $minor_unit
|
||||
*
|
||||
*/
|
||||
public function setAxisOptionsProperties($axis_labels, $horizontal_crosses_value = null, $horizontal_crosses = null,
|
||||
$axis_orientation = null, $major_tmt = null, $minor_tmt = null, $minimum = null, $maximum = null, $major_unit = null,
|
||||
$minor_unit = null)
|
||||
public function setAxisOptionsProperties($axis_labels, $horizontal_crosses_value = null, $horizontal_crosses = null, $axis_orientation = null, $major_tmt = null, $minor_tmt = null, $minimum = null, $maximum = null, $major_unit = null, $minor_unit = null)
|
||||
{
|
||||
$this->_axis_options['axis_labels'] = (string) $axis_labels;
|
||||
($horizontal_crosses_value !== null)
|
||||
|
@ -201,7 +199,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAxisOptionsProperty($property) {
|
||||
public function getAxisOptionsProperty($property)
|
||||
{
|
||||
return $this->_axis_options[$property];
|
||||
}
|
||||
|
||||
|
@ -211,7 +210,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
* @param string $orientation
|
||||
*
|
||||
*/
|
||||
public function setAxisOrientation($orientation) {
|
||||
public function setAxisOrientation($orientation)
|
||||
{
|
||||
$this->orientation = (string) $orientation;
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function setFillParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB) {
|
||||
public function setFillParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB)
|
||||
{
|
||||
$this->_fill_properties = $this->setColorProperties($color, $alpha, $type);
|
||||
}
|
||||
|
||||
|
@ -235,7 +236,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function setLineParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB) {
|
||||
public function setLineParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB)
|
||||
{
|
||||
$this->_line_properties = $this->setColorProperties($color, $alpha, $type);
|
||||
}
|
||||
|
||||
|
@ -246,7 +248,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFillProperty($property) {
|
||||
public function getFillProperty($property)
|
||||
{
|
||||
return $this->_fill_properties[$property];
|
||||
}
|
||||
|
||||
|
@ -257,7 +260,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLineProperty($property) {
|
||||
public function getLineProperty($property)
|
||||
{
|
||||
return $this->_line_properties[$property];
|
||||
}
|
||||
|
||||
|
@ -276,10 +280,7 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
*
|
||||
*/
|
||||
|
||||
public function setLineStyleProperties($line_width = null, $compound_type = null,
|
||||
$dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null,
|
||||
$head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null) {
|
||||
|
||||
public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null) {
|
||||
(!is_null($line_width)) ? $this->_line_style_properties['width'] = $this->getExcelPointsWidth((float) $line_width)
|
||||
: null;
|
||||
(!is_null($compound_type)) ? $this->_line_style_properties['compound'] = (string) $compound_type : null;
|
||||
|
@ -304,7 +305,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
* @return string
|
||||
*/
|
||||
|
||||
public function getLineStyleProperty($elements) {
|
||||
public function getLineStyleProperty($elements)
|
||||
{
|
||||
return $this->getArrayElementsValue($this->_line_style_properties, $elements);
|
||||
}
|
||||
|
||||
|
@ -316,7 +318,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
* @return string
|
||||
*/
|
||||
|
||||
public function getLineStyleArrowWidth($arrow) {
|
||||
public function getLineStyleArrowWidth($arrow)
|
||||
{
|
||||
return $this->getLineStyleArrowSize($this->_line_style_properties['arrow'][$arrow]['size'], 'w');
|
||||
}
|
||||
|
||||
|
@ -328,7 +331,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||
* @return string
|
||||
*/
|
||||
|
||||
public function getLineStyleArrowLength($arrow) {
|
||||
public function getLineStyleArrowLength($arrow)
|
||||
{
|
||||
return $this->getLineStyleArrowSize($this->_line_style_properties['arrow'][$arrow]['size'], 'len');
|
||||
}
|
||||
|
||||
|
|
|
@ -31,5 +31,4 @@ interface PHPExcel_IComparable
|
|||
* @return string Hash code
|
||||
*/
|
||||
public function getHashCode();
|
||||
|
||||
}
|
||||
|
|
|
@ -432,8 +432,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
|||
// FONT Index
|
||||
if ($element instanceof PHPExcel_RichText_Run) {
|
||||
$str_fontidx = $this->_fntHashIndex[$element->getFont()->getHashCode()];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$str_fontidx = 0;
|
||||
}
|
||||
$arrcRun[] = array('strlen' => $str_pos, 'fontidx' => $str_fontidx);
|
||||
|
@ -573,12 +572,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
|||
$firstCellCoordinates = PHPExcel_Cell::coordinateFromString($firstCell); // e.g. array(0, 1)
|
||||
$lastCellCoordinates = PHPExcel_Cell::coordinateFromString($lastCell); // e.g. array(1, 6)
|
||||
|
||||
return(pack('vvvv',
|
||||
$firstCellCoordinates[1] - 1,
|
||||
$lastCellCoordinates[1] - 1,
|
||||
PHPExcel_Cell::columnIndexFromString($firstCellCoordinates[0]) - 1,
|
||||
PHPExcel_Cell::columnIndexFromString($lastCellCoordinates[0]) - 1
|
||||
));
|
||||
return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, PHPExcel_Cell::columnIndexFromString($firstCellCoordinates[0]) - 1, PHPExcel_Cell::columnIndexFromString($lastCellCoordinates[0]) - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1260,8 +1254,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
|||
$grbit |= 0x0100;
|
||||
|
||||
$header = pack("vv", $record, $length);
|
||||
$data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw,
|
||||
$irwMac,$reserved, $grbit, $ixfe);
|
||||
$data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, $irwMac,$reserved, $grbit, $ixfe);
|
||||
$this->_append($header.$data);
|
||||
}
|
||||
|
||||
|
@ -1424,8 +1417,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
|||
$grbit |= $level << 8;
|
||||
|
||||
$header = pack("vv", $record, $length);
|
||||
$data = pack("vvvvvv", $colFirst, $colLast, $coldx,
|
||||
$ixfe, $grbit, $reserved);
|
||||
$data = pack("vvvvvv", $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved);
|
||||
$this->_append($header.$data);
|
||||
}
|
||||
|
||||
|
@ -1554,14 +1546,14 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
|
|||
}
|
||||
|
||||
$recordData = pack(
|
||||
'vvVVVvv'
|
||||
, 0x0862
|
||||
, 0x0000 // unused
|
||||
, 0x00000000 // unused
|
||||
, 0x00000000 // unused
|
||||
, 0x00000014 // size of record data
|
||||
, $this->_colors[$this->_phpSheet->getTabColor()->getRGB()] // color index
|
||||
, 0x0000 // unused
|
||||
'vvVVVvv',
|
||||
0x0862,
|
||||
0x0000, // unused
|
||||
0x00000000, // unused
|
||||
0x00000000, // unused
|
||||
0x00000014, // size of record data
|
||||
$this->_colors[$this->_phpSheet->getTabColor()->getRGB()], // color index
|
||||
0x0000 // unused
|
||||
);
|
||||
|
||||
$length = strlen($recordData);
|
||||
|
|
|
@ -491,7 +491,8 @@ class PHPExcel_Writer_Excel5_Xf
|
|||
* @param string $vAlign
|
||||
* @return int
|
||||
*/
|
||||
private static function _mapVAlign($vAlign) {
|
||||
private static function _mapVAlign($vAlign)
|
||||
{
|
||||
if (isset(self::$_mapVAlign[$vAlign])) {
|
||||
return self::$_mapVAlign[$vAlign];
|
||||
}
|
||||
|
@ -504,7 +505,8 @@ class PHPExcel_Writer_Excel5_Xf
|
|||
* @param int $textRotation
|
||||
* @return int
|
||||
*/
|
||||
private static function _mapTextRotation($textRotation) {
|
||||
private static function _mapTextRotation($textRotation)
|
||||
{
|
||||
if ($textRotation >= 0) {
|
||||
return $textRotation;
|
||||
}
|
||||
|
@ -522,7 +524,8 @@ class PHPExcel_Writer_Excel5_Xf
|
|||
* @param string
|
||||
* @return int
|
||||
*/
|
||||
private static function _mapLocked($locked) {
|
||||
private static function _mapLocked($locked)
|
||||
{
|
||||
switch ($locked) {
|
||||
case PHPExcel_Style_Protection::PROTECTION_INHERIT:
|
||||
return 1;
|
||||
|
@ -541,7 +544,8 @@ class PHPExcel_Writer_Excel5_Xf
|
|||
* @param string
|
||||
* @return int
|
||||
*/
|
||||
private static function _mapHidden($hidden) {
|
||||
private static function _mapHidden($hidden)
|
||||
{
|
||||
switch ($hidden) {
|
||||
case PHPExcel_Style_Protection::PROTECTION_INHERIT:
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue