Skip to content

Commit 64aca5c

Browse files
committed
Use getter for js-phpize on output
1 parent e09373c commit 64aca5c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/JsPhpize/JsPhpizePhug.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ public function __construct(ModuleContainerInterface $container)
4949
$compiler->setOptionsRecursive([
5050
'patterns' => [
5151
'transform_expression' => function ($jsCode) use ($compiler) {
52-
5352
$jsPhpize = $this->getJsPhpizeEngine($compiler);
54-
5553
$compilation = $this->compile($jsPhpize, $jsCode, $compiler->getPath());
5654

5755
if (!($compilation instanceof Exception)) {
@@ -106,9 +104,7 @@ public function getEventListeners()
106104
return [
107105
CompilerEvent::OUTPUT => function (Compiler\Event\OutputEvent $event) {
108106
$compiler = $event->getTarget();
109-
110-
/** @var JsPhpize $jsPhpize */
111-
$jsPhpize = $compiler->getOption('jsphpize_engine');
107+
$jsPhpize = $this->getJsPhpizeEngine($compiler);
112108
$output = preg_replace(
113109
'/\{\s*\?><\?(?:php)?\s*\}/',
114110
'{}',

0 commit comments

Comments
 (0)