Skip to content

Commit c2cc2fc

Browse files
committed
PHP-CS-Fixer
1 parent 3f799e6 commit c2cc2fc

6 files changed

Lines changed: 20 additions & 12 deletions

File tree

src/Exporter/Html/Block/TableExporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ public function __construct(Table $node)
1414
parent::__construct($node);
1515
// TODO: implement numbered rows
1616
// TODO: implement width
17-
$this->tags = [sprintf('<table class="adf-table adf-table-%s"><tbody>', $node->getLayout()), '</tbody></table>'];
17+
$this->tags = [\sprintf('<table class="adf-table adf-table-%s"><tbody>', $node->getLayout()), '</tbody></table>'];
1818
}
1919
}

src/Exporter/Html/HtmlExporter.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function export(): string
140140
{
141141
// skip parsing media if includeMedia is false
142142
if (!$this->includeMedia && ($this->node instanceof MediaSingle || $this->node instanceof MediaGroup)) {
143-
return "";
143+
return '';
144144
}
145145

146146
$outputs = [];
@@ -168,20 +168,24 @@ public function export(): string
168168

169169
if (1 === \count($this->tags)) {
170170
// no closing tag
171-
return $this->tags[0] . $output;
171+
return $this->tags[0].$output;
172172
}
173173

174174
// opening and closing tags
175-
return $this->tags[0] . $output . $this->tags[1];
175+
return $this->tags[0].$output.$this->tags[1];
176176
}
177177

178178
/**
179-
* Enable output of Media Nodes
179+
* Enable output of Media Nodes.
180+
*
180181
* @param bool $incl If media should be included
182+
*
181183
* @return $this
182184
*/
183-
public function includeMedia(bool $incl = true): self {
185+
public function includeMedia(bool $incl = true): self
186+
{
184187
$this->includeMedia = $incl;
188+
185189
return $this;
186190
}
187191
}

src/Node/Block/MediaSingle.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ public function __construct(string $layout, ?float $width = null, ?BlockNode $pa
5050
parent::__construct($parent);
5151
$this->layout = $layout;
5252

53-
if (is_float($width))
53+
if (\is_float($width)) {
5454
$width = round($width, 2);
55+
}
5556
$this->width = $width;
5657
}
5758

src/Node/Block/Table.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ public function __construct(string $layout = 'align-start', bool $isNumberColumn
4343
$this->isNumberColumnEnabled = $isNumberColumnEnabled;
4444
$this->localId = $localId;
4545

46-
if ($width !== null)
46+
if (null !== $width) {
4747
$width = abs($width);
48+
}
4849
$this->width = $width;
4950
}
5051

src/Node/Child/Media.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ public function __construct(string $id, string $mediaType, string $collection, ?
3636
$this->collection = $collection;
3737
$this->occurrenceKey = $occurrenceKey;
3838

39-
if (is_float($width))
39+
if (\is_float($width)) {
4040
$width = round($width, 2);
41+
}
4142
$this->width = $width;
4243

43-
if (is_float($height))
44+
if (\is_float($height)) {
4445
$height = round($height, 2);
46+
}
4547
$this->height = $height;
4648
}
4749

0 commit comments

Comments
 (0)