PSR-2 : Fixes

This commit is contained in:
Progi1984 2015-05-12 14:01:22 +02:00
parent 2896d62e08
commit 5bb747f8cc
7 changed files with 66 additions and 66 deletions

View File

@ -191,7 +191,8 @@ class PHPExcel_Cell_DataValidation
* *
* @return string * @return string
*/ */
public function getFormula2() { public function getFormula2()
{
return $this->formula2; return $this->formula2;
} }

View File

@ -176,9 +176,7 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
* @param string $minor_unit * @param string $minor_unit
* *
*/ */
public function setAxisOptionsProperties($axis_labels, $horizontal_crosses_value = null, $horizontal_crosses = 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)
$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; $this->_axis_options['axis_labels'] = (string) $axis_labels;
($horizontal_crosses_value !== null) ($horizontal_crosses_value !== null)
@ -201,7 +199,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
* *
* @return string * @return string
*/ */
public function getAxisOptionsProperty($property) { public function getAxisOptionsProperty($property)
{
return $this->_axis_options[$property]; return $this->_axis_options[$property];
} }
@ -211,7 +210,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
* @param string $orientation * @param string $orientation
* *
*/ */
public function setAxisOrientation($orientation) { public function setAxisOrientation($orientation)
{
$this->orientation = (string) $orientation; $this->orientation = (string) $orientation;
} }
@ -223,7 +223,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
* @param string $type * @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); $this->_fill_properties = $this->setColorProperties($color, $alpha, $type);
} }
@ -235,7 +236,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
* @param string $type * @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); $this->_line_properties = $this->setColorProperties($color, $alpha, $type);
} }
@ -246,7 +248,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
* *
* @return string * @return string
*/ */
public function getFillProperty($property) { public function getFillProperty($property)
{
return $this->_fill_properties[$property]; return $this->_fill_properties[$property];
} }
@ -257,7 +260,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
* *
* @return string * @return string
*/ */
public function getLineProperty($property) { public function getLineProperty($property)
{
return $this->_line_properties[$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, 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) {
$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) (!is_null($line_width)) ? $this->_line_style_properties['width'] = $this->getExcelPointsWidth((float) $line_width)
: null; : null;
(!is_null($compound_type)) ? $this->_line_style_properties['compound'] = (string) $compound_type : 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 * @return string
*/ */
public function getLineStyleProperty($elements) { public function getLineStyleProperty($elements)
{
return $this->getArrayElementsValue($this->_line_style_properties, $elements); return $this->getArrayElementsValue($this->_line_style_properties, $elements);
} }
@ -316,7 +318,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
* @return string * @return string
*/ */
public function getLineStyleArrowWidth($arrow) { public function getLineStyleArrowWidth($arrow)
{
return $this->getLineStyleArrowSize($this->_line_style_properties['arrow'][$arrow]['size'], 'w'); 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 * @return string
*/ */
public function getLineStyleArrowLength($arrow) { public function getLineStyleArrowLength($arrow)
{
return $this->getLineStyleArrowSize($this->_line_style_properties['arrow'][$arrow]['size'], 'len'); return $this->getLineStyleArrowSize($this->_line_style_properties['arrow'][$arrow]['size'], 'len');
} }

View File

@ -31,5 +31,4 @@ interface PHPExcel_IComparable
* @return string Hash code * @return string Hash code
*/ */
public function getHashCode(); public function getHashCode();
} }

View File

@ -432,8 +432,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
// FONT Index // FONT Index
if ($element instanceof PHPExcel_RichText_Run) { if ($element instanceof PHPExcel_RichText_Run) {
$str_fontidx = $this->_fntHashIndex[$element->getFont()->getHashCode()]; $str_fontidx = $this->_fntHashIndex[$element->getFont()->getHashCode()];
} } else {
else {
$str_fontidx = 0; $str_fontidx = 0;
} }
$arrcRun[] = array('strlen' => $str_pos, 'fontidx' => $str_fontidx); $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) $firstCellCoordinates = PHPExcel_Cell::coordinateFromString($firstCell); // e.g. array(0, 1)
$lastCellCoordinates = PHPExcel_Cell::coordinateFromString($lastCell); // e.g. array(1, 6) $lastCellCoordinates = PHPExcel_Cell::coordinateFromString($lastCell); // e.g. array(1, 6)
return(pack('vvvv', return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, PHPExcel_Cell::columnIndexFromString($firstCellCoordinates[0]) - 1, PHPExcel_Cell::columnIndexFromString($lastCellCoordinates[0]) - 1);
$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; $grbit |= 0x0100;
$header = pack("vv", $record, $length); $header = pack("vv", $record, $length);
$data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, $data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, $irwMac,$reserved, $grbit, $ixfe);
$irwMac,$reserved, $grbit, $ixfe);
$this->_append($header.$data); $this->_append($header.$data);
} }
@ -1424,8 +1417,7 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
$grbit |= $level << 8; $grbit |= $level << 8;
$header = pack("vv", $record, $length); $header = pack("vv", $record, $length);
$data = pack("vvvvvv", $colFirst, $colLast, $coldx, $data = pack("vvvvvv", $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved);
$ixfe, $grbit, $reserved);
$this->_append($header.$data); $this->_append($header.$data);
} }
@ -1554,14 +1546,14 @@ class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter
} }
$recordData = pack( $recordData = pack(
'vvVVVvv' 'vvVVVvv',
, 0x0862 0x0862,
, 0x0000 // unused 0x0000, // unused
, 0x00000000 // unused 0x00000000, // unused
, 0x00000000 // unused 0x00000000, // unused
, 0x00000014 // size of record data 0x00000014, // size of record data
, $this->_colors[$this->_phpSheet->getTabColor()->getRGB()] // color index $this->_colors[$this->_phpSheet->getTabColor()->getRGB()], // color index
, 0x0000 // unused 0x0000 // unused
); );
$length = strlen($recordData); $length = strlen($recordData);

View File

@ -491,7 +491,8 @@ class PHPExcel_Writer_Excel5_Xf
* @param string $vAlign * @param string $vAlign
* @return int * @return int
*/ */
private static function _mapVAlign($vAlign) { private static function _mapVAlign($vAlign)
{
if (isset(self::$_mapVAlign[$vAlign])) { if (isset(self::$_mapVAlign[$vAlign])) {
return self::$_mapVAlign[$vAlign]; return self::$_mapVAlign[$vAlign];
} }
@ -504,7 +505,8 @@ class PHPExcel_Writer_Excel5_Xf
* @param int $textRotation * @param int $textRotation
* @return int * @return int
*/ */
private static function _mapTextRotation($textRotation) { private static function _mapTextRotation($textRotation)
{
if ($textRotation >= 0) { if ($textRotation >= 0) {
return $textRotation; return $textRotation;
} }
@ -522,7 +524,8 @@ class PHPExcel_Writer_Excel5_Xf
* @param string * @param string
* @return int * @return int
*/ */
private static function _mapLocked($locked) { private static function _mapLocked($locked)
{
switch ($locked) { switch ($locked) {
case PHPExcel_Style_Protection::PROTECTION_INHERIT: case PHPExcel_Style_Protection::PROTECTION_INHERIT:
return 1; return 1;
@ -541,7 +544,8 @@ class PHPExcel_Writer_Excel5_Xf
* @param string * @param string
* @return int * @return int
*/ */
private static function _mapHidden($hidden) { private static function _mapHidden($hidden)
{
switch ($hidden) { switch ($hidden) {
case PHPExcel_Style_Protection::PROTECTION_INHERIT: case PHPExcel_Style_Protection::PROTECTION_INHERIT:
return 0; return 0;