Add rule for operator spacing
[MAILPOET-2090]
This commit is contained in:
@@ -32,7 +32,7 @@ class Renderer {
|
||||
|
||||
function render($data) {
|
||||
$column_count = count($data['blocks']);
|
||||
$columns_layout = isset($data['columnLayout'])?$data['columnLayout']:null;
|
||||
$columns_layout = isset($data['columnLayout']) ? $data['columnLayout'] : null;
|
||||
$column_widths = ColumnsHelper::columnWidth($column_count, $columns_layout);
|
||||
$column_content = [];
|
||||
|
||||
|
@@ -103,7 +103,7 @@ class Text {
|
||||
if (!preg_match('/text-align/i', $style)) {
|
||||
$style = 'text-align: left;' . $style;
|
||||
}
|
||||
$contents = str_replace('&', '&', $paragraph->html());
|
||||
$contents = str_replace('&', '&', $paragraph->html());
|
||||
$paragraph->setTag('table');
|
||||
$paragraph->style = 'border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;';
|
||||
$paragraph->width = '100%';
|
||||
|
@@ -18,7 +18,7 @@ class Renderer {
|
||||
private function renderOneColumn($content_block, $content) {
|
||||
$template = $this->getOneColumnTemplate(
|
||||
$content_block['styles']['block'],
|
||||
isset($content_block['image'])?$content_block['image']:null
|
||||
isset($content_block['image']) ? $content_block['image'] : null
|
||||
);
|
||||
return $template['content_start'] . $content . $template['content_end'];
|
||||
}
|
||||
@@ -48,19 +48,19 @@ class Renderer {
|
||||
|
||||
private function renderMultipleColumns($content_block, $columns_data) {
|
||||
$columns_count = count($content_block['blocks']);
|
||||
$columns_layout = isset($content_block['columnLayout'])?$content_block['columnLayout']:null;
|
||||
$columns_layout = isset($content_block['columnLayout']) ? $content_block['columnLayout'] : null;
|
||||
|
||||
$widths = ColumnsHelper::columnWidth($columns_count, $columns_layout);
|
||||
$class = ColumnsHelper::columnClass($columns_count);
|
||||
$alignment = ColumnsHelper::columnAlignment($columns_count);
|
||||
$index = 0;
|
||||
$result = $this->getMultipleColumnsContainerStart($class, $content_block['styles']['block'], isset($content_block['image'])?$content_block['image']:null);
|
||||
$result = $this->getMultipleColumnsContainerStart($class, $content_block['styles']['block'], isset($content_block['image']) ? $content_block['image'] : null);
|
||||
foreach ($columns_data as $content) {
|
||||
$result .= $this->getMultipleColumnsContentStart($widths[$index++], $alignment, $class);
|
||||
$result .= $content;
|
||||
$result .= $this->getMultipleColumnsContentEnd();
|
||||
}
|
||||
$result .= $this->getMultipleColumnsContainerEnd();
|
||||
$result .= $this->getMultipleColumnsContainerEnd();
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user