Skip to content

Commit f53561d

Browse files
committed
Various fixes
1 parent bbaf551 commit f53561d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/PhpWord/Style/Colors/AbstractColor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ final public function toHexOrName(bool $includeHash = false)
1515
if ($this instanceof StaticColorInterface) {
1616
return $this->toHex($includeHash);
1717
}
18-
throw new Exception(sprintf('All colors must implement NamedAbstractColor or StaticAbstractColor. \'%s\' does not implement either.', get_class($this)));
18+
throw new Exception(sprintf('All colors must implement NamedColorInterface or StaticColorInterface. \'%s\' does not implement either.', get_class($this)));
1919
}
2020
}

src/PhpWord/Writer/HTML/Style/Font.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function write()
4343
$font = $style->getName();
4444
$size = $style->getSize()->toInt('pt');
4545
$color = $style->getColor()->toHex(true);
46-
$fgColor = $style->getFgColor()->toName();
46+
$fgColor = $style->getFgColor()->getName();
4747
$underline = $style->getUnderline() != FontStyle::UNDERLINE_NONE;
4848
$lineThrough = $style->isStrikethrough() || $style->isDoubleStrikethrough();
4949

tests/PhpWord/Style/Colors/ColorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function testConversions()
5050

5151
/**
5252
* @expectedException \Exception
53-
* @expectedExceptionMessage All colors must implement NamedAbstractColor or StaticAbstractColor. 'class@anonymous
53+
* @expectedExceptionMessage All colors must implement NamedColorInterface or StaticColorInterface. 'class@anonymous
5454
*/
5555
public function testBadClass()
5656
{

tests/PhpWord/Style/Colors/RgbTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace PhpOffice\PhpWord\Style\Colors;
2020

2121
/**
22-
* @coversDefaultClass \PhpOffice\PhpWord\Style\Colors\SystemColor
22+
* @coversDefaultClass \PhpOffice\PhpWord\Style\Colors\Rgb
2323
*/
2424
class RgbTest extends \PHPUnit\Framework\TestCase
2525
{

0 commit comments

Comments
 (0)