Skip to content

Commit cd9a17f

Browse files
devX2712Progi1984
authored andcommitted
EVOL-Define const for strike types
1 parent 33c4619 commit cd9a17f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/PhpPresentation/Style/Font.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ class Font implements ComparableInterface
4646
public const UNDERLINE_WAVYDOUBLE = 'wavyDbl';
4747
public const UNDERLINE_WAVYHEAVY = 'wavyHeavy';
4848
public const UNDERLINE_WORDS = 'words';
49+
50+
/* Strike types */
51+
public const STRIKE_NONE = 'noStrike';
52+
public const STRIKE_SINGLE = 'sngStrike';
53+
public const STRIKE_DOUBLE = 'dblStrike';
4954

5055
public const FORMAT_LATIN = 'latin';
5156
public const FORMAT_EAST_ASIAN = 'ea';
@@ -149,7 +154,7 @@ class Font implements ComparableInterface
149154
public function __construct()
150155
{
151156
$this->color = new Color(Color::COLOR_BLACK);
152-
$this->strikethrough = 'noStrike';
157+
$this->strikethrough = self::STRIKE_NONE;
153158
}
154159

155160
/**
@@ -345,10 +350,10 @@ public function isStrikethrough(): bool
345350
/**
346351
* Set Strikethrough.
347352
*/
348-
public function setStrikethrough($pValue = 'noStrike')
353+
public function setStrikethrough($pValue = self::STRIKE_NONE)
349354
{
350355
if ($pValue == '') {
351-
$pValue = 'noStrike';
356+
$pValue = self::STRIKE_NONE;
352357
}
353358
$this->strikethrough = $pValue;
354359

0 commit comments

Comments
 (0)