@@ -849,17 +849,15 @@ protected static function parseStyleDeclarations(array $selectors, array $styles
849849 // Word does not accept shortened hex colors e.g. #CCC, only full e.g. #CCCCCC
850850 // we determine the order of color and style by checking value of the color.
851851 $ namedColors = self ::mapNamedBorderColor ();
852- foreach ($ valueArr as $ tmpValue ){
853-
852+ foreach ($ valueArr as $ tmpValue ) {
854853 if (strpos ($ tmpValue , '# ' ) === 0 || isset ($ namedColors [$ tmpValue ])) {
855854 $ color = trim ($ tmpValue , '# ' );
856- } elseif (strpos ($ tmpValue , 'px ' ) !== false ||
855+ } elseif (strpos ($ tmpValue , 'px ' ) !== false ||
857856 strpos ($ tmpValue , 'pt ' ) !== false ||
858857 strpos ($ tmpValue , 'cm ' ) !== false ||
859858 strpos ($ tmpValue , 'mm ' ) !== false ||
860859 strpos ($ tmpValue , 'in ' ) !== false ||
861- strpos ($ tmpValue , 'pc ' ) !== false )
862- {
860+ strpos ($ tmpValue , 'pc ' ) !== false ) {
863861 $ size = Converter::cssToTwip ($ tmpValue );
864862 } else {
865863 $ style = self ::mapBorderStyle ($ valueArr [2 ]);
@@ -885,6 +883,7 @@ protected static function parseStyleDeclarations(array $selectors, array $styles
885883 $ styles ["border {$ which }Size " ] = $ size ; // twips
886884 $ styles ["border {$ which }Color " ] = $ color ;
887885 $ styles ["border {$ which }Style " ] = $ style ;
886+
888887 }
889888 break ;
890889 case 'vertical-align ' :
@@ -1040,9 +1039,6 @@ protected static function mapBorderStyle($cssBorderStyle)
10401039 }
10411040 }
10421041
1043- /**
1044- * @return array
1045- */
10461042 protected static function mapNamedBorderColor (): array
10471043 {
10481044 $ colors = [];
0 commit comments