@@ -849,17 +849,15 @@ protected static function parseStyleDeclarations(array $selectors, array $styles
849
849
// Word does not accept shortened hex colors e.g. #CCC, only full e.g. #CCCCCC
850
850
// we determine the order of color and style by checking value of the color.
851
851
$ namedColors = self ::mapNamedBorderColor ();
852
- foreach ($ valueArr as $ tmpValue ){
853
-
852
+ foreach ($ valueArr as $ tmpValue ) {
854
853
if (strpos ($ tmpValue , '# ' ) === 0 || isset ($ namedColors [$ tmpValue ])) {
855
854
$ color = trim ($ tmpValue , '# ' );
856
- } elseif (strpos ($ tmpValue , 'px ' ) !== false ||
855
+ } elseif (strpos ($ tmpValue , 'px ' ) !== false ||
857
856
strpos ($ tmpValue , 'pt ' ) !== false ||
858
857
strpos ($ tmpValue , 'cm ' ) !== false ||
859
858
strpos ($ tmpValue , 'mm ' ) !== false ||
860
859
strpos ($ tmpValue , 'in ' ) !== false ||
861
- strpos ($ tmpValue , 'pc ' ) !== false )
862
- {
860
+ strpos ($ tmpValue , 'pc ' ) !== false ) {
863
861
$ size = Converter::cssToTwip ($ tmpValue );
864
862
} else {
865
863
$ style = self ::mapBorderStyle ($ valueArr [2 ]);
@@ -885,6 +883,7 @@ protected static function parseStyleDeclarations(array $selectors, array $styles
885
883
$ styles ["border {$ which }Size " ] = $ size ; // twips
886
884
$ styles ["border {$ which }Color " ] = $ color ;
887
885
$ styles ["border {$ which }Style " ] = $ style ;
886
+
888
887
}
889
888
break ;
890
889
case 'vertical-align ' :
@@ -1040,9 +1039,6 @@ protected static function mapBorderStyle($cssBorderStyle)
1040
1039
}
1041
1040
}
1042
1041
1043
- /**
1044
- * @return array
1045
- */
1046
1042
protected static function mapNamedBorderColor (): array
1047
1043
{
1048
1044
$ colors = [];
0 commit comments