@@ -37,7 +37,7 @@ |
||
| 37 | 37 | public function getHtml(string $indent) |
| 38 | 38 | { |
| 39 | 39 | // make sure a color is set |
| 40 | - if (empty($this->styles['color'])){ |
|
| 40 | + if (empty($this->styles['color'])) { |
|
| 41 | 41 | $this->setColor($this->getBuilder()->backsideColor()); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -55,16 +55,16 @@ |
||
| 55 | 55 | $html = $this->getBuilder()->getHtmlComment('EMAIL BODY' . ' //', $indent); |
| 56 | 56 | |
| 57 | 57 | // create a table container |
| 58 | - $html .= $indent . '<table bgcolor="'.$this->getBuilder()->emailBodyBackground() . '"' |
|
| 59 | - . ' width="'. $this->getBuilder()->emailBodyWidth() . '"' |
|
| 60 | - . ' border="0" cellpadding="0" cellspacing="0" id="emailBody">' .PHP_EOL; |
|
| 58 | + $html .= $indent . '<table bgcolor="' . $this->getBuilder()->emailBodyBackground() . '"' |
|
| 59 | + . ' width="' . $this->getBuilder()->emailBodyWidth() . '"' |
|
| 60 | + . ' border="0" cellpadding="0" cellspacing="0" id="emailBody">' . PHP_EOL; |
|
| 61 | 61 | |
| 62 | 62 | // render child elements collection |
| 63 | - foreach ($this->childElements as $element){ |
|
| 64 | - $html .= $element->getHtml($indent . ' ') .PHP_EOL ; |
|
| 63 | + foreach ($this->childElements as $element) { |
|
| 64 | + $html .= $element->getHtml($indent . ' ') . PHP_EOL; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $html .= $indent . '</table>'.PHP_EOL; |
|
| 67 | + $html .= $indent . '</table>' . PHP_EOL; |
|
| 68 | 68 | $html .= $this->getBuilder()->getHtmlComment('// ' . 'EMAIL BODY', $indent); |
| 69 | 69 | $html .= PHP_EOL; |
| 70 | 70 | |
@@ -36,9 +36,9 @@ |
||
| 36 | 36 | private $buttonText = ''; |
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | - * @access private |
|
| 40 | - * @var string $buttonSrc |
|
| 41 | - */ |
|
| 39 | + * @access private |
|
| 40 | + * @var string $buttonSrc |
|
| 41 | + */ |
|
| 42 | 42 | private $buttonSrc = ''; |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | $this->buttonText = $content; |
| 53 | 53 | $this->buttonSrc = $src; |
| 54 | 54 | $this->styles['button_background'] = '#DA5A20'; |
| 55 | - $this->styles['button_color'] = '#EEEEEE'; |
|
| 56 | - $this->styles['button_padding'] = '15'; |
|
| 55 | + $this->styles['button_color'] = '#EEEEEE'; |
|
| 56 | + $this->styles['button_padding'] = '15'; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -110,69 +110,69 @@ discard block |
||
| 110 | 110 | // html result. start with an empty string or a html comment |
| 111 | 111 | $html = $this->getBuilder()->getHtmlComment('ROW BUTTON ' . ' //', $indent); |
| 112 | 112 | |
| 113 | - $html .= $indent . '<tr>'.PHP_EOL; |
|
| 114 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 113 | + $html .= $indent . '<tr>' . PHP_EOL; |
|
| 114 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 115 | 115 | |
| 116 | 116 | $html .= $this->getBuilder()->getHtmlComment('CENTERING TABLE //', $indent . ' '); |
| 117 | 117 | |
| 118 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">'.PHP_EOL; |
|
| 119 | - $html .= $indent . ' <tr '. $this->getRowStyle() .'>'.PHP_EOL; |
|
| 120 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 118 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">' . PHP_EOL; |
|
| 119 | + $html .= $indent . ' <tr ' . $this->getRowStyle() . '>' . PHP_EOL; |
|
| 120 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 121 | 121 | |
| 122 | 122 | $html .= $this->getBuilder()->getHtmlComment('FLEXIBLE CONTAINER //', $indent . ' '); |
| 123 | 123 | |
| 124 | - $html .= $indent . ' <table border="0" cellpadding="' . $this->cellPadding. |
|
| 125 | - '" cellspacing="0" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 126 | - '" class="flexibleContainer">'.PHP_EOL; |
|
| 124 | + $html .= $indent . ' <table border="0" cellpadding="' . $this->cellPadding . |
|
| 125 | + '" cellspacing="0" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 126 | + '" class="flexibleContainer">' . PHP_EOL; |
|
| 127 | 127 | |
| 128 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 129 | - $html .= $indent . ' <td '. $this->getRowStyle() . |
|
| 130 | - ' align="center" valign="top" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 131 | - '" class="flexibleContainerCell">'.PHP_EOL; |
|
| 128 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 129 | + $html .= $indent . ' <td ' . $this->getRowStyle() . |
|
| 130 | + ' align="center" valign="top" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 131 | + '" class="flexibleContainerCell">' . PHP_EOL; |
|
| 132 | 132 | |
| 133 | 133 | $html .= $this->getBuilder()->getHtmlComment('CONTENT TABLE //', $indent . ' '); |
| 134 | 134 | |
| 135 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="50%"'. |
|
| 136 | - ' class="emailButton" style="background-color: '. |
|
| 137 | - $this->getEffectiveStyle('background-color') . ';">'.PHP_EOL; |
|
| 135 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="50%"' . |
|
| 136 | + ' class="emailButton" style="background-color: ' . |
|
| 137 | + $this->getEffectiveStyle('background-color') . ';">' . PHP_EOL; |
|
| 138 | 138 | |
| 139 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 140 | - $html .= $indent . ' <td align="center" valign="middle" class="buttonContent" cellpadding="0" '. |
|
| 141 | - 'bgcolor="'.$this->getEffectiveStyle('button_background').'"'. |
|
| 142 | - ' style="'. |
|
| 143 | - 'padding-top:' . $this->getEffectiveStyle('button_padding'). 'px;'. |
|
| 144 | - 'padding-bottom:' . $this->getEffectiveStyle('button_padding'). 'px;'. |
|
| 145 | - 'padding-left:' . $this->getEffectiveStyle('button_padding'). 'px;'. |
|
| 146 | - 'padding-right:' . $this->getEffectiveStyle('button_padding'). 'px;'. |
|
| 147 | - '"'. |
|
| 148 | - '>'.PHP_EOL; |
|
| 149 | - $html .= $indent . ' <a style="color:'. $this->getEffectiveStyle('button_color') . |
|
| 139 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 140 | + $html .= $indent . ' <td align="center" valign="middle" class="buttonContent" cellpadding="0" ' . |
|
| 141 | + 'bgcolor="' . $this->getEffectiveStyle('button_background') . '"' . |
|
| 142 | + ' style="' . |
|
| 143 | + 'padding-top:' . $this->getEffectiveStyle('button_padding') . 'px;' . |
|
| 144 | + 'padding-bottom:' . $this->getEffectiveStyle('button_padding') . 'px;' . |
|
| 145 | + 'padding-left:' . $this->getEffectiveStyle('button_padding') . 'px;' . |
|
| 146 | + 'padding-right:' . $this->getEffectiveStyle('button_padding') . 'px;' . |
|
| 147 | + '"' . |
|
| 148 | + '>' . PHP_EOL; |
|
| 149 | + $html .= $indent . ' <a style="color:' . $this->getEffectiveStyle('button_color') . |
|
| 150 | 150 | ';text-decoration:none;font-family:' . $this->getEffectiveStyle('font') . |
| 151 | 151 | ';font-size:20px;line-height:135%;" ' . |
| 152 | 152 | 'href="' . $this->buttonSrc . '" target="_blank">' . |
| 153 | 153 | $this->buttonText . |
| 154 | - '</a>'.PHP_EOL; |
|
| 154 | + '</a>' . PHP_EOL; |
|
| 155 | 155 | |
| 156 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 157 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 158 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 156 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 157 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 158 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 159 | 159 | |
| 160 | 160 | $html .= $this->getBuilder()->getHtmlComment('// CONTENT TABLE', $indent . ' '); |
| 161 | 161 | |
| 162 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 163 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 164 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 162 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 163 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 164 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 165 | 165 | |
| 166 | 166 | $html .= $this->getBuilder()->getHtmlComment('// FLEXIBLE CONTAINER', $indent . ' '); |
| 167 | 167 | |
| 168 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 169 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 170 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 168 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 169 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 170 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 171 | 171 | |
| 172 | 172 | $html .= $this->getBuilder()->getHtmlComment('// CENTERING TABLE', $indent . ' '); |
| 173 | 173 | |
| 174 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 175 | - $html .= $indent . '</tr>'.PHP_EOL; |
|
| 174 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 175 | + $html .= $indent . '</tr>' . PHP_EOL; |
|
| 176 | 176 | |
| 177 | 177 | $html .= $this->getBuilder()->getHtmlComment('// ' . 'ROW BUTTON', $indent); |
| 178 | 178 | return $html; |
@@ -60,14 +60,14 @@ |
||
| 60 | 60 | private $imageMaxHeight = null; |
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | - * Constructor |
|
| 64 | - * |
|
| 65 | - * @access public |
|
| 66 | - * @param string $src The image source |
|
| 67 | - * @param int $width The image width |
|
| 68 | - * @param string $title The image title |
|
| 69 | - * @param string $alt The image alt |
|
| 70 | - */ |
|
| 63 | + * Constructor |
|
| 64 | + * |
|
| 65 | + * @access public |
|
| 66 | + * @param string $src The image source |
|
| 67 | + * @param int $width The image width |
|
| 68 | + * @param string $title The image title |
|
| 69 | + * @param string $alt The image alt |
|
| 70 | + */ |
|
| 71 | 71 | public function __construct(string $src, int $width, string $title = '', string $alt = '') |
| 72 | 72 | { |
| 73 | 73 | $this->imageSrc = $src; |
@@ -101,12 +101,12 @@ |
||
| 101 | 101 | { |
| 102 | 102 | return $this->getBuilder()->getHtmlComment('IMAGE', $indent) . $indent |
| 103 | 103 | . '<img class="flexibleImage"' |
| 104 | - . ' src="'. $this->imageSrc . '"' |
|
| 105 | - . ' width="'. strval($this->imageWidth) . '"' |
|
| 106 | - . ' alt="'. $this->imageAlt . '"' |
|
| 107 | - . ' title="'. $this->imageTitle . '"' |
|
| 108 | - . ' style="max-width:'. strval($this->imageWidth) .'px;width:100%;display:block;' |
|
| 109 | - . (empty($this->imageMaxHeight) ? '' : 'max-height:'. strval($this->imageMaxHeight) .'px;') |
|
| 104 | + . ' src="' . $this->imageSrc . '"' |
|
| 105 | + . ' width="' . strval($this->imageWidth) . '"' |
|
| 106 | + . ' alt="' . $this->imageAlt . '"' |
|
| 107 | + . ' title="' . $this->imageTitle . '"' |
|
| 108 | + . ' style="max-width:' . strval($this->imageWidth) . 'px;width:100%;display:block;' |
|
| 109 | + . (empty($this->imageMaxHeight) ? '' : 'max-height:' . strval($this->imageMaxHeight) . 'px;') |
|
| 110 | 110 | . '"/>'; |
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | \ No newline at end of file |
@@ -58,14 +58,14 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | public function getHtml(string $indent) |
| 60 | 60 | { |
| 61 | - $html = $indent . '<div'. $this->getInlineStyles() . '>'. PHP_EOL; |
|
| 61 | + $html = $indent . '<div' . $this->getInlineStyles() . '>' . PHP_EOL; |
|
| 62 | 62 | |
| 63 | 63 | // render child elements collection |
| 64 | - foreach ($this->elements() as $element){ |
|
| 65 | - $html .= $element->getHtml($indent . ' '). PHP_EOL ; |
|
| 64 | + foreach ($this->elements() as $element) { |
|
| 65 | + $html .= $element->getHtml($indent . ' ') . PHP_EOL; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $html .= $indent . '</div>'.PHP_EOL; |
|
| 68 | + $html .= $indent . '</div>' . PHP_EOL; |
|
| 69 | 69 | return $html; |
| 70 | 70 | } |
| 71 | 71 | |
@@ -39,9 +39,9 @@ |
||
| 39 | 39 | private $linkTitle = ''; |
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | - * @access private |
|
| 43 | - * @var string $content |
|
| 44 | - */ |
|
| 42 | + * @access private |
|
| 43 | + * @var string $content |
|
| 44 | + */ |
|
| 45 | 45 | protected $content = ''; |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -82,11 +82,11 @@ |
||
| 82 | 82 | . $indent |
| 83 | 83 | . '<a class="link"' |
| 84 | 84 | . ' target="_blank"' |
| 85 | - . ' href="'. $this->linkHref . '"' |
|
| 86 | - . ' title="'. $this->linkTitle . '"' |
|
| 85 | + . ' href="' . $this->linkHref . '"' |
|
| 86 | + . ' title="' . $this->linkTitle . '"' |
|
| 87 | 87 | . $this->getInlineStyles() |
| 88 | - . '>'. PHP_EOL |
|
| 88 | + . '>' . PHP_EOL |
|
| 89 | 89 | . $this->content |
| 90 | - . '</a>'. PHP_EOL; |
|
| 90 | + . '</a>' . PHP_EOL; |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | \ No newline at end of file |
@@ -27,17 +27,17 @@ |
||
| 27 | 27 | class RowImage extends Row |
| 28 | 28 | { |
| 29 | 29 | /** |
| 30 | - * @access private |
|
| 31 | - * @var Image $image |
|
| 32 | - */ |
|
| 30 | + * @access private |
|
| 31 | + * @var Image $image |
|
| 32 | + */ |
|
| 33 | 33 | private $image = null; |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * Constructor |
|
| 37 | - * |
|
| 38 | - * @access public |
|
| 39 | - * @param Image $img |
|
| 40 | - */ |
|
| 36 | + * Constructor |
|
| 37 | + * |
|
| 38 | + * @access public |
|
| 39 | + * @param Image $img |
|
| 40 | + */ |
|
| 41 | 41 | public function __construct(Image $img) |
| 42 | 42 | { |
| 43 | 43 | $this->add($img); |
@@ -70,54 +70,54 @@ |
||
| 70 | 70 | // html result. start with an empty string or a html comment |
| 71 | 71 | $html = $this->getBuilder()->getHtmlComment('ROW IMAGE CONTAINER' . ' //', $indent); |
| 72 | 72 | |
| 73 | - $html .= $indent . '<tr>'.PHP_EOL; |
|
| 74 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 73 | + $html .= $indent . '<tr>' . PHP_EOL; |
|
| 74 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 75 | 75 | |
| 76 | 76 | $html .= $this->getBuilder()->getHtmlComment('CENTERING TABLE //', $indent . ' '); |
| 77 | 77 | |
| 78 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="'. $this->getEffectiveStyle('background-color').'">'.PHP_EOL; |
|
| 79 | - $html .= $indent . ' <tr '.$this->getRowStyle() .'>'.PHP_EOL; |
|
| 80 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 78 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="' . $this->getEffectiveStyle('background-color') . '">' . PHP_EOL; |
|
| 79 | + $html .= $indent . ' <tr ' . $this->getRowStyle() . '>' . PHP_EOL; |
|
| 80 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 81 | 81 | |
| 82 | 82 | $html .= $this->getBuilder()->getHtmlComment('FLEXIBLE CONTAINER //', $indent . ' '); |
| 83 | 83 | |
| 84 | 84 | $html .= $indent . ' <table border="0" cellspacing="0" cellpadding="' . $this->cellPadding . |
| 85 | - '" bgcolor="'. $this->getEffectiveStyle('background-color'). |
|
| 86 | - '" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 87 | - '" class="flexibleContainer">'.PHP_EOL; |
|
| 88 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 89 | - $html .= $indent . ' <td '. $this->getRowStyle() . |
|
| 90 | - ' align="center" valign="top" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 91 | - '" class="flexibleContainerCell">'.PHP_EOL; |
|
| 85 | + '" bgcolor="' . $this->getEffectiveStyle('background-color') . |
|
| 86 | + '" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 87 | + '" class="flexibleContainer">' . PHP_EOL; |
|
| 88 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 89 | + $html .= $indent . ' <td ' . $this->getRowStyle() . |
|
| 90 | + ' align="center" valign="top" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 91 | + '" class="flexibleContainerCell">' . PHP_EOL; |
|
| 92 | 92 | |
| 93 | 93 | $html .= $this->getBuilder()->getHtmlComment('CONTENT TABLE //', $indent . ' '); |
| 94 | 94 | |
| 95 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">'.PHP_EOL; |
|
| 96 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 97 | - $html .= $indent . ' <td valign="top" class="imageContent" color="'. $this->getEffectiveStyle('color') . '" bgcolor="'. $this->getEffectiveStyle('background-color') . '">'.PHP_EOL; |
|
| 95 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">' . PHP_EOL; |
|
| 96 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 97 | + $html .= $indent . ' <td valign="top" class="imageContent" color="' . $this->getEffectiveStyle('color') . '" bgcolor="' . $this->getEffectiveStyle('background-color') . '">' . PHP_EOL; |
|
| 98 | 98 | |
| 99 | - $html .= $this->image->getHtml($indent . ' ').PHP_EOL;; |
|
| 99 | + $html .= $this->image->getHtml($indent . ' ') . PHP_EOL; ; |
|
| 100 | 100 | |
| 101 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 102 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 103 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 101 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 102 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 103 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 104 | 104 | |
| 105 | 105 | $html .= $this->getBuilder()->getHtmlComment('// CONTENT TABLE', $indent . ' '); |
| 106 | 106 | |
| 107 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 108 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 109 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 107 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 108 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 109 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 110 | 110 | |
| 111 | 111 | $html .= $this->getBuilder()->getHtmlComment('// FLEXIBLE CONTAINER', $indent . ' '); |
| 112 | 112 | |
| 113 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 114 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 115 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 113 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 114 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 115 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 116 | 116 | |
| 117 | 117 | $html .= $this->getBuilder()->getHtmlComment('// CENTERING TABLE', $indent . ' '); |
| 118 | 118 | |
| 119 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 120 | - $html .= $indent . '</tr>'.PHP_EOL; |
|
| 119 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 120 | + $html .= $indent . '</tr>' . PHP_EOL; |
|
| 121 | 121 | |
| 122 | 122 | $html .= $this->getBuilder()->getHtmlComment('// ' . 'ROW IMAGE CONTAINER', $indent); |
| 123 | 123 | return $html; |
@@ -49,14 +49,14 @@ discard block |
||
| 49 | 49 | * @var array $knowStyles |
| 50 | 50 | */ |
| 51 | 51 | protected $knowStyles = array( |
| 52 | - 'color' , |
|
| 52 | + 'color', |
|
| 53 | 53 | 'background-color', |
| 54 | 54 | 'font-family', |
| 55 | 55 | 'font-size', |
| 56 | 56 | 'font-weight', |
| 57 | 57 | 'line-height', |
| 58 | - 'padding-top' , |
|
| 59 | - 'padding-left' , |
|
| 58 | + 'padding-top', |
|
| 59 | + 'padding-left', |
|
| 60 | 60 | 'padding-bottom', |
| 61 | 61 | 'padding-right', |
| 62 | 62 | 'text-align', |
@@ -80,8 +80,8 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function setStyles(array $styles = []) |
| 82 | 82 | { |
| 83 | - foreach ($styles as $key => $value){ |
|
| 84 | - if (in_array($key, $this->knowStyles)){ |
|
| 83 | + foreach ($styles as $key => $value) { |
|
| 84 | + if (in_array($key, $this->knowStyles)) { |
|
| 85 | 85 | $this->styles[$key] = $value; |
| 86 | 86 | } |
| 87 | 87 | } |
@@ -42,11 +42,11 @@ |
||
| 42 | 42 | protected $removePaddingTop = false; |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | - * True to remove bottom padding. Default is false |
|
| 46 | - * |
|
| 47 | - * @access protected |
|
| 48 | - * @var bool $removePaddingTop |
|
| 49 | - */ |
|
| 45 | + * True to remove bottom padding. Default is false |
|
| 46 | + * |
|
| 47 | + * @access protected |
|
| 48 | + * @var bool $removePaddingTop |
|
| 49 | + */ |
|
| 50 | 50 | protected $removePaddingBottom = false; |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -95,10 +95,10 @@ |
||
| 95 | 95 | */ |
| 96 | 96 | protected function getRowStyle() |
| 97 | 97 | { |
| 98 | - return ($this->removePaddingTop || $this->removePaddingBottom ) ? |
|
| 99 | - 'style="'. |
|
| 98 | + return ($this->removePaddingTop || $this->removePaddingBottom) ? |
|
| 99 | + 'style="' . |
|
| 100 | 100 | ($this->removePaddingTop ? 'padding-top:0;' : '') . |
| 101 | - ($this->removePaddingBottom ? 'padding-bottom:0;' : ''). |
|
| 101 | + ($this->removePaddingBottom ? 'padding-bottom:0;' : '') . |
|
| 102 | 102 | '"' : ''; |
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | \ No newline at end of file |