Skip to content

Commit 5b688d5

Browse files
committed
fix formatting
1 parent 31968fa commit 5b688d5

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

src/PhpWord/Style/Chart.php

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class Chart extends AbstractStyle
5151
* @var array
5252
*/
5353
private $colors = array();
54-
55-
/**
54+
55+
/**
5656
* Chart title
5757
*
5858
* @var string
@@ -111,9 +111,15 @@ class Chart extends AbstractStyle
111111
*/
112112
private $valueAxisTitle;
113113

114+
/**
115+
* The position for major tick marks
116+
* Possible values are 'in', 'out', 'cross', 'none'
117+
*
118+
* @var string
119+
*/
114120
private $majorTickMarkPos = 'none';
115121

116-
/*
122+
/**
117123
* Show labels for axis
118124
*
119125
* @var bool
@@ -234,7 +240,7 @@ public function setColors($value = array())
234240

235241
return $this;
236242
}
237-
243+
238244
/**
239245
* Get the chart title
240246
*
@@ -248,7 +254,7 @@ public function getTitle()
248254
/**
249255
* Set the chart title
250256
*
251-
* @param string $value
257+
* @param string $value
252258
*/
253259
public function setTitle($value = null)
254260
{
@@ -262,15 +268,15 @@ public function setTitle($value = null)
262268
*
263269
* @return bool
264270
*/
265-
public function getShowLegend()
271+
public function isShowLegend()
266272
{
267273
return $this->showLegend;
268274
}
269275

270276
/**
271277
* Set chart legend visibility
272278
*
273-
* @param bool $value
279+
* @param bool $value
274280
*/
275281
public function setShowLegend($value = false)
276282
{
@@ -452,16 +458,16 @@ public function getMajorTickPosition()
452458
}
453459

454460
/**
455-
* set the position for major tick marks
456-
* @param string $position [description]
461+
* Set the position for major tick marks
462+
* @param string $position
457463
*/
458464
public function setMajorTickPosition($position)
459465
{
460466
$enum = array('in', 'out', 'cross', 'none');
461467
$this->majorTickMarkPos = $this->setEnumVal($position, $enum, $this->majorTickMarkPos);
462468
}
463469

464-
/*
470+
/**
465471
* Show Gridlines for X-Axis
466472
*
467473
* @return bool

src/PhpWord/Writer/Word2007/Part/Chart.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,12 @@ private function writePlotArea(XMLWriter $xmlWriter)
128128
$type = $this->element->getType();
129129
$style = $this->element->getStyle();
130130
$this->options = $this->types[$type];
131-
132-
$title = $style->getTitle();
133-
$showLegend = $style->getShowLegend();
131+
132+
$title = $style->getTitle();
133+
$showLegend = $style->isShowLegend();
134134

135135
//Chart title
136-
if($title){
136+
if ($title) {
137137
$xmlWriter->startElement('c:title');
138138
$xmlWriter->startElement('c:tx');
139139
$xmlWriter->startElement('c:rich');
@@ -142,20 +142,18 @@ private function writePlotArea(XMLWriter $xmlWriter)
142142
<a:lstStyle/>
143143
<a:p>
144144
<a:pPr>
145-
<a:defRPr/></a:pPr><a:r><a:rPr/><a:t>'.$title.'</a:t></a:r>
145+
<a:defRPr/></a:pPr><a:r><a:rPr/><a:t>' . $title . '</a:t></a:r>
146146
<a:endParaRPr/>
147147
</a:p>');
148-
149148
$xmlWriter->endElement(); // c:rich
150149
$xmlWriter->endElement(); // c:tx
151150
$xmlWriter->endElement(); // c:title
152-
153-
}else{
151+
} else {
154152
$xmlWriter->writeElementBlock('c:autoTitleDeleted', 'val', 1);
155153
}
156154

157155
//Chart legend
158-
if($showLegend){
156+
if ($showLegend) {
159157
$xmlWriter->writeRaw('<c:legend><c:legendPos val="r"/></c:legend>');
160158
}
161159

0 commit comments

Comments
 (0)