@@ -148,30 +148,28 @@ private function writeSide($side, $width, $color, $style, $space)
148148 } else {
149149 $ content .= $ types [$ this ->type ] . substr ($ side , 0 , 1 );
150150 }
151- } else {
152- return '' ;
153- }
154-
155- if (isset ($ styles [$ style ])) {
156- $ content .= $ styles [$ style ];
157- } else {
158- $ content .= '\brdrs ' ; // default style
159- }
160- $ content .= $ this ->getValueIf ($ width !== null , '\brdrw ' . round ($ width ?? 0 )); // Width
161- $ content .= $ this ->getValueIf ($ color !== null , '\brdrcf ' . $ colorIndex ); // Color
162151
163- // Space
164- if ($ this ->type == 'section ' ) {
165- $ space = $ space !== null ? $ space : '480 ' ; // section default is 480
166- } elseif ($ this ->type == 'paragraph ' ) {
167- if ($ side == 'top ' || $ side == 'bottom ' ) {
168- $ space = $ space !== null ? $ space : '20 ' ; // paragraph top|bottom default is 20
169- } elseif ($ side == 'left ' || $ side == 'right ' ) {
170- $ space = $ space !== null ? $ space : '80 ' ; // paragraph left|rigth default is 80
152+ if (isset ($ style , $ styles [$ style ])) {
153+ $ content .= $ styles [$ style ];
154+ } else {
155+ $ content .= '\brdrs ' ; // default style
156+ }
157+ $ content .= $ this ->getValueIf ($ width !== null , '\brdrw ' . round ($ width ?? 0 )); // Width
158+ $ content .= $ this ->getValueIf ($ color !== null , '\brdrcf ' . $ colorIndex ); // Color
159+
160+ // Space
161+ if ($ this ->type == 'section ' ) {
162+ $ space = $ space !== null ? $ space : '480 ' ; // section default is 480
163+ } elseif ($ this ->type == 'paragraph ' ) {
164+ if ($ side == 'top ' || $ side == 'bottom ' ) {
165+ $ space = $ space !== null ? $ space : '20 ' ; // paragraph top|bottom default is 20
166+ } elseif ($ side == 'left ' || $ side == 'right ' ) {
167+ $ space = $ space !== null ? $ space : '80 ' ; // paragraph left|rigth default is 80
168+ }
171169 }
170+ $ content .= $ this ->getValueIf ($ space !== null , '\brsp ' . round ($ space ?? 0 ));
171+ $ content .= ' ' ;
172172 }
173- $ content .= $ this ->getValueIf ($ space !== null , '\brsp ' . round ($ space ?? 0 ));
174- $ content .= ' ' ;
175173
176174 return $ content ;
177175 }
0 commit comments