Skip to content

Commit

Permalink
Use first class callables for Texy phrase handler
Browse files Browse the repository at this point in the history
  • Loading branch information
spaze committed Nov 23, 2023
1 parent 4406f81 commit 4928aa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/app/Formatter/TexyFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function getTexy(): Texy
$this->texy->headingModule->idPrefix = '';
$this->texy->typographyModule->locale = substr($this->translator->getDefaultLocale(), 0, 2); // en_US → en
$this->texy->allowed['phrase/del'] = true;
$this->texy->addHandler('phrase', [$this->phraseHandler, 'solve']);
$this->texy->addHandler('phrase', $this->phraseHandler->solve(...));
$this->setTopHeading($this->topHeading);
return $this->texy;
}
Expand Down
2 changes: 1 addition & 1 deletion site/tests/Formatter/TexyPhraseHandlerTest.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TexyPhraseHandlerTest extends TestCase
TexyPhraseHandler $phraseHandler,
) {
$this->texy = new Texy();
$this->texy->addHandler('phrase', [$phraseHandler, 'solve']);
$this->texy->addHandler('phrase', $phraseHandler->solve(...));
$applicationPresenter->setLinkCallback($application, $this->buildUrl(...));
$this->defaultLocale = $translator->getDefaultLocale();
}
Expand Down

0 comments on commit 4928aa2

Please sign in to comment.