mirror of
https://github.com/retailcrm/PHPExcel.git
synced 2025-02-06 09:49:24 +03:00
We changed the coding standard to PSR-2, and wow! What happened next was awesome
This commit is contained in:
parent
06c1ea78de
commit
feac76dadf
File diff suppressed because it is too large
Load Diff
@ -179,8 +179,7 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
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;
|
$this->_axis_options['axis_labels'] = (string) $axis_labels;
|
||||||
($horizontal_crosses_value !== null)
|
($horizontal_crosses_value !== null) ? $this->_axis_options['horizontal_crosses_value'] = (string) $horizontal_crosses_value : null;
|
||||||
? $this->_axis_options['horizontal_crosses_value'] = (string) $horizontal_crosses_value : null;
|
|
||||||
($horizontal_crosses !== null) ? $this->_axis_options['horizontal_crosses'] = (string) $horizontal_crosses : null;
|
($horizontal_crosses !== null) ? $this->_axis_options['horizontal_crosses'] = (string) $horizontal_crosses : null;
|
||||||
($axis_orientation !== null) ? $this->_axis_options['orientation'] = (string) $axis_orientation : null;
|
($axis_orientation !== null) ? $this->_axis_options['orientation'] = (string) $axis_orientation : null;
|
||||||
($major_tmt !== null) ? $this->_axis_options['major_tick_mark'] = (string) $major_tmt : null;
|
($major_tmt !== null) ? $this->_axis_options['major_tick_mark'] = (string) $major_tmt : null;
|
||||||
@ -279,22 +278,16 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
* @param string $end_arrow_size
|
* @param string $end_arrow_size
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
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)
|
(!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;
|
||||||
(!is_null($dash_type)) ? $this->_line_style_properties['dash'] = (string) $dash_type : null;
|
(!is_null($dash_type)) ? $this->_line_style_properties['dash'] = (string) $dash_type : null;
|
||||||
(!is_null($cap_type)) ? $this->_line_style_properties['cap'] = (string) $cap_type : null;
|
(!is_null($cap_type)) ? $this->_line_style_properties['cap'] = (string) $cap_type : null;
|
||||||
(!is_null($join_type)) ? $this->_line_style_properties['join'] = (string) $join_type : null;
|
(!is_null($join_type)) ? $this->_line_style_properties['join'] = (string) $join_type : null;
|
||||||
(!is_null($head_arrow_type)) ? $this->_line_style_properties['arrow']['head']['type'] = (string) $head_arrow_type
|
(!is_null($head_arrow_type)) ? $this->_line_style_properties['arrow']['head']['type'] = (string) $head_arrow_type : null;
|
||||||
: null;
|
(!is_null($head_arrow_size)) ? $this->_line_style_properties['arrow']['head']['size'] = (string) $head_arrow_size : null;
|
||||||
(!is_null($head_arrow_size)) ? $this->_line_style_properties['arrow']['head']['size'] = (string) $head_arrow_size
|
(!is_null($end_arrow_type)) ? $this->_line_style_properties['arrow']['end']['type'] = (string) $end_arrow_type : null;
|
||||||
: null;
|
(!is_null($end_arrow_size)) ? $this->_line_style_properties['arrow']['end']['size'] = (string) $end_arrow_size : null;
|
||||||
(!is_null($end_arrow_type)) ? $this->_line_style_properties['arrow']['end']['type'] = (string) $end_arrow_type
|
|
||||||
: null;
|
|
||||||
(!is_null($end_arrow_size)) ? $this->_line_style_properties['arrow']['end']['size'] = (string) $end_arrow_size
|
|
||||||
: null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -304,7 +297,6 @@ 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);
|
||||||
@ -317,7 +309,6 @@ 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');
|
||||||
@ -330,7 +321,6 @@ 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');
|
||||||
@ -348,10 +338,8 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
* @param float $sh_distance
|
* @param float $sh_distance
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null) {
|
public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null) {
|
||||||
$this
|
$this->_setShadowPresetsProperties((int) $sh_presets)
|
||||||
->_setShadowPresetsProperties((int) $sh_presets)
|
|
||||||
->_setShadowColor(
|
->_setShadowColor(
|
||||||
is_null($sh_color_value) ? $this->_shadow_properties['color']['value'] : $sh_color_value
|
is_null($sh_color_value) ? $this->_shadow_properties['color']['value'] : $sh_color_value
|
||||||
, is_null($sh_color_alpha) ? (int) $this->_shadow_properties['color']['alpha'] : $sh_color_alpha
|
, is_null($sh_color_alpha) ? (int) $this->_shadow_properties['color']['alpha'] : $sh_color_alpha
|
||||||
@ -368,7 +356,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return PHPExcel_Chart_Axis
|
* @return PHPExcel_Chart_Axis
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function _setShadowPresetsProperties($shadow_presets) {
|
private function _setShadowPresetsProperties($shadow_presets) {
|
||||||
$this->_shadow_properties['presets'] = $shadow_presets;
|
$this->_shadow_properties['presets'] = $shadow_presets;
|
||||||
$this->_setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets));
|
$this->_setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets));
|
||||||
@ -384,7 +371,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return PHPExcel_Chart_Axis
|
* @return PHPExcel_Chart_Axis
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function _setShadowProperiesMapValues(array $properties_map, &$reference = null) {
|
private function _setShadowProperiesMapValues(array $properties_map, &$reference = null) {
|
||||||
$base_reference = $reference;
|
$base_reference = $reference;
|
||||||
foreach ($properties_map as $property_key => $property_val) {
|
foreach ($properties_map as $property_key => $property_val) {
|
||||||
@ -416,7 +402,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return PHPExcel_Chart_Axis
|
* @return PHPExcel_Chart_Axis
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function _setShadowColor($color, $alpha, $type) {
|
private function _setShadowColor($color, $alpha, $type) {
|
||||||
$this->_shadow_properties['color'] = $this->setColorProperties($color, $alpha, $type);
|
$this->_shadow_properties['color'] = $this->setColorProperties($color, $alpha, $type);
|
||||||
|
|
||||||
@ -430,7 +415,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return PHPExcel_Chart_Axis
|
* @return PHPExcel_Chart_Axis
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function _setShadowBlur($blur) {
|
private function _setShadowBlur($blur) {
|
||||||
if ($blur !== null) {
|
if ($blur !== null) {
|
||||||
$this->_shadow_properties['blur'] = (string) $this->getExcelPointsWidth($blur);
|
$this->_shadow_properties['blur'] = (string) $this->getExcelPointsWidth($blur);
|
||||||
@ -446,7 +430,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return PHPExcel_Chart_Axis
|
* @return PHPExcel_Chart_Axis
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function _setShadowAngle($angle) {
|
private function _setShadowAngle($angle) {
|
||||||
if ($angle !== null) {
|
if ($angle !== null) {
|
||||||
$this->_shadow_properties['direction'] = (string) $this->getExcelPointsAngle($angle);
|
$this->_shadow_properties['direction'] = (string) $this->getExcelPointsAngle($angle);
|
||||||
@ -462,7 +445,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return PHPExcel_Chart_Axis
|
* @return PHPExcel_Chart_Axis
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function _setShadowDistance($distance) {
|
private function _setShadowDistance($distance) {
|
||||||
if ($distance !== null) {
|
if ($distance !== null) {
|
||||||
$this->_shadow_properties['distance'] = (string) $this->getExcelPointsWidth($distance);
|
$this->_shadow_properties['distance'] = (string) $this->getExcelPointsWidth($distance);
|
||||||
@ -479,7 +461,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
* @param int $color_alpha
|
* @param int $color_alpha
|
||||||
* @param string $color_type
|
* @param string $color_type
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function getShadowProperty($elements) {
|
public function getShadowProperty($elements) {
|
||||||
return $this->getArrayElementsValue($this->_shadow_properties, $elements);
|
return $this->getArrayElementsValue($this->_shadow_properties, $elements);
|
||||||
}
|
}
|
||||||
@ -492,14 +473,13 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
* @param int $color_alpha
|
* @param int $color_alpha
|
||||||
* @param string $color_type
|
* @param string $color_type
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null) {
|
public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null) {
|
||||||
$this
|
$this->_setGlowSize($size)
|
||||||
->_setGlowSize($size)
|
|
||||||
->_setGlowColor(
|
->_setGlowColor(
|
||||||
is_null($color_value) ? $this->_glow_properties['color']['value'] : $color_value
|
is_null($color_value) ? $this->_glow_properties['color']['value'] : $color_value
|
||||||
, is_null($color_alpha) ? (int) $this->_glow_properties['color']['alpha'] : $color_alpha
|
, is_null($color_alpha) ? (int) $this->_glow_properties['color']['alpha'] : $color_alpha
|
||||||
, is_null($color_type) ? $this->_glow_properties['color']['type'] : $color_type);
|
, is_null($color_type) ? $this->_glow_properties['color']['type'] : $color_type
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -509,7 +489,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function getGlowProperty($property) {
|
public function getGlowProperty($property) {
|
||||||
return $this->getArrayElementsValue($this->_glow_properties, $property);
|
return $this->getArrayElementsValue($this->_glow_properties, $property);
|
||||||
}
|
}
|
||||||
@ -521,7 +500,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return PHPExcel_Chart_Axis
|
* @return PHPExcel_Chart_Axis
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function _setGlowSize($size) {
|
private function _setGlowSize($size) {
|
||||||
if (!is_null($size)) {
|
if (!is_null($size)) {
|
||||||
$this->_glow_properties['size'] = $this->getExcelPointsWidth($size);
|
$this->_glow_properties['size'] = $this->getExcelPointsWidth($size);
|
||||||
@ -539,7 +517,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return PHPExcel_Chart_Axis
|
* @return PHPExcel_Chart_Axis
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private function _setGlowColor($color, $alpha, $type) {
|
private function _setGlowColor($color, $alpha, $type) {
|
||||||
$this->_glow_properties['color'] = $this->setColorProperties($color, $alpha, $type);
|
$this->_glow_properties['color'] = $this->setColorProperties($color, $alpha, $type);
|
||||||
|
|
||||||
@ -551,7 +528,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @param float $size
|
* @param float $size
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function setSoftEdges($size) {
|
public function setSoftEdges($size) {
|
||||||
if (!is_null($size)) {
|
if (!is_null($size)) {
|
||||||
$_soft_edges['size'] = (string) $this->getExcelPointsWidth($size);
|
$_soft_edges['size'] = (string) $this->getExcelPointsWidth($size);
|
||||||
@ -563,7 +539,6 @@ class PHPExcel_Chart_Axis extends PHPExcel_Chart_Properties
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function getSoftEdgesSize() {
|
public function getSoftEdgesSize() {
|
||||||
return $this->_soft_edges['size'];
|
return $this->_soft_edges['size'];
|
||||||
}
|
}
|
||||||
|
@ -387,5 +387,4 @@ class PHPExcel_Chart_DataSeries
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user