diff --git a/src/Spout/Writer/Style/Style.php b/src/Spout/Writer/Style/Style.php index 6aafee6..e778854 100644 --- a/src/Spout/Writer/Style/Style.php +++ b/src/Spout/Writer/Style/Style.php @@ -33,9 +33,9 @@ class Style protected $hasSetFontUnderline = false; /** @var bool Whether the font should be struck through */ - protected $fontStrikeThrough = false; + protected $fontStrikethrough = false; /** @var bool Whether the strikethrough property was set */ - protected $hasSetFontStrikeThrough = false; + protected $hasSetFontStrikethrough = false; /** @var int Font size */ protected $fontSize = self::DEFAULT_FONT_SIZE; @@ -133,18 +133,18 @@ class Style /** * @return boolean */ - public function isFontStrikeThrough() + public function isFontStrikethrough() { - return $this->fontStrikeThrough; + return $this->fontStrikethrough; } /** * @return Style */ - public function setFontStrikeThrough() + public function setFontStrikethrough() { - $this->fontStrikeThrough = true; - $this->hasSetFontStrikeThrough = true; + $this->fontStrikethrough = true; + $this->hasSetFontStrikethrough = true; $this->shouldApplyFont = true; return $this; } @@ -259,8 +259,8 @@ class Style if (!$this->hasSetFontUnderline && $baseStyle->isFontUnderline()) { $mergedStyle->setFontUnderline(); } - if (!$this->hasSetFontStrikeThrough && $baseStyle->isFontStrikeThrough()) { - $mergedStyle->setFontStrikeThrough(); + if (!$this->hasSetFontStrikethrough && $baseStyle->isFontStrikethrough()) { + $mergedStyle->setFontStrikethrough(); } if (!$this->hasSetFontSize && $baseStyle->getFontSize() !== self::DEFAULT_FONT_SIZE) { $mergedStyle->setFontSize($baseStyle->getFontSize()); diff --git a/src/Spout/Writer/Style/StyleBuilder.php b/src/Spout/Writer/Style/StyleBuilder.php index b82198b..6725f2a 100644 --- a/src/Spout/Writer/Style/StyleBuilder.php +++ b/src/Spout/Writer/Style/StyleBuilder.php @@ -59,9 +59,9 @@ class StyleBuilder * * @return StyleBuilder */ - public function setFontStrikeThrough() + public function setFontStrikethrough() { - $this->style->setFontStrikeThrough(); + $this->style->setFontStrikethrough(); return $this; } diff --git a/src/Spout/Writer/XLSX/Helper/StyleHelper.php b/src/Spout/Writer/XLSX/Helper/StyleHelper.php index e986683..8bae6af 100644 --- a/src/Spout/Writer/XLSX/Helper/StyleHelper.php +++ b/src/Spout/Writer/XLSX/Helper/StyleHelper.php @@ -162,7 +162,7 @@ EOD; if ($style->isFontUnderline()) { $content .= ' ' . PHP_EOL; } - if ($style->isFontStrikeThrough()) { + if ($style->isFontStrikethrough()) { $content .= ' ' . PHP_EOL; } diff --git a/tests/Spout/Writer/Style/StyleTest.php b/tests/Spout/Writer/Style/StyleTest.php index 5e991ec..fb93e9b 100644 --- a/tests/Spout/Writer/Style/StyleTest.php +++ b/tests/Spout/Writer/Style/StyleTest.php @@ -71,14 +71,14 @@ class StyleTest extends \PHPUnit_Framework_TestCase public function testMergeWithShouldPreferCurrentStylePropertyIfSetOnCurrentButNotOnBase() { $baseStyle = (new StyleBuilder())->build(); - $currentStyle = (new StyleBuilder())->setFontItalic()->setFontStrikeThrough()->build(); + $currentStyle = (new StyleBuilder())->setFontItalic()->setFontStrikethrough()->build(); $mergedStyle = $currentStyle->mergeWith($baseStyle); $this->assertFalse($baseStyle->isFontItalic()); - $this->assertFalse($baseStyle->isFontStrikeThrough()); + $this->assertFalse($baseStyle->isFontStrikethrough()); $this->assertTrue($mergedStyle->isFontItalic()); - $this->assertTrue($mergedStyle->isFontStrikeThrough()); + $this->assertTrue($mergedStyle->isFontStrikethrough()); } /** @@ -89,7 +89,7 @@ class StyleTest extends \PHPUnit_Framework_TestCase $baseStyle = (new StyleBuilder()) ->setFontItalic() ->setFontUnderline() - ->setFontStrikeThrough() + ->setFontStrikethrough() ->setShouldWrapText() ->build(); $currentStyle = (new StyleBuilder())->build(); diff --git a/tests/Spout/Writer/XLSX/WriterWithStyleTest.php b/tests/Spout/Writer/XLSX/WriterWithStyleTest.php index b450061..9172d1c 100644 --- a/tests/Spout/Writer/XLSX/WriterWithStyleTest.php +++ b/tests/Spout/Writer/XLSX/WriterWithStyleTest.php @@ -106,7 +106,7 @@ class WriterWithStyleTest extends \PHPUnit_Framework_TestCase ->setFontBold() ->setFontItalic() ->setFontUnderline() - ->setFontStrikeThrough() + ->setFontStrikethrough() ->build(); $style2 = (new StyleBuilder()) ->setFontSize(15)