Skip to content

Commit e40449e

Browse files
committed
fix variable names
1 parent 13fc647 commit e40449e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/PhpWord/Writer/HTML/Element/Table.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ public function write()
5353
$cellBgColor = $cellStyle->getBgColor();
5454
$cellFgColor = null;
5555
if ($cellBgColor) {
56-
$r = hexdec(substr($cellBgColor, 0, 2));
57-
$g = hexdec(substr($cellBgColor, 2, 2));
58-
$b = hexdec(substr($cellBgColor, 4, 2));
59-
$cellFgColor = (($r * 0.299 + $g * 0.587 + $b * 0.114) > 186) ? null : 'ffffff';
56+
$red = hexdec(substr($cellBgColor, 0, 2));
57+
$green = hexdec(substr($cellBgColor, 2, 2));
58+
$blue = hexdec(substr($cellBgColor, 4, 2));
59+
$cellFgColor = (($red * 0.299 + $green * 0.587 + $blue * 0.114) > 186) ? null : 'ffffff';
6060
}
6161
$cellColSpan = $cellStyle->getGridSpan();
6262
$cellRowSpan = 1;

0 commit comments

Comments
 (0)