Skip to content

Commit 37f3c8a

Browse files
committed
Use Texy constants on the class, not on the object
1 parent da66ecc commit 37f3c8a

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

app/psalm-baseline.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,6 @@
266266
<code><![CDATA[$matches[2]]]></code>
267267
</MixedArgument>
268268
</file>
269-
<file src="src/Formatter/TexyPhraseHandler.php">
270-
<MixedArgument>
271-
<code><![CDATA[$texy::CONTENT_TEXTUAL]]></code>
272-
</MixedArgument>
273-
</file>
274269
<file src="src/Media/VideoThumbnails.php">
275270
<MixedArgument>
276271
<code><![CDATA[$values->videoThumbnail]]></code>

app/src/Formatter/TexyFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function setTopHeading(int $level): self
105105
public function getTexy(): Texy
106106
{
107107
$this->texy = new Texy();
108-
$this->texy->allowedTags = $this->texy::NONE;
108+
$this->texy->allowedTags = Texy::NONE;
109109
$this->texy->imageModule->root = "{$this->staticRoot}/{$this->imagesRoot}";
110110
$this->texy->imageModule->fileRoot = "{$this->locationRoot}/{$this->imagesRoot}";
111111
$this->texy->figureModule->widthDelta = false; // prevents adding 'unsafe-inline' style="width: Xpx" attribute to <div class="figure">

app/src/Formatter/TexyPhraseHandler.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Texy\HtmlElement;
2222
use Texy\Link;
2323
use Texy\Modifier;
24+
use Texy\Texy;
2425

2526
readonly class TexyPhraseHandler
2627
{
@@ -98,7 +99,7 @@ public function solve(HandlerInvocation $invocation, string $phrase, string $con
9899
$trainingLink = $this->proceed($invocation, $phrase, $content, $modifier, $link);
99100
if ($trainingLink !== false) {
100101
$el->add($trainingLink);
101-
$el->add($texy->protect($this->getTrainingSuffix($name), $texy::CONTENT_TEXTUAL));
102+
$el->add($texy->protect($this->getTrainingSuffix($name), Texy::CONTENT_TEXTUAL));
102103
return $el;
103104
}
104105
}

0 commit comments

Comments
 (0)