Skip to content

Commit f0a5baf

Browse files
committed
fix: Php compactor missing imports and return statement
1 parent 3c7e958 commit f0a5baf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Compactor/Php.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Native\Laravel\Compactor;
44

55
use PhpToken;
6+
use RuntimeException;
7+
use Webmozart\Assert\Assert;
68

79
class Php
810
{
@@ -17,7 +19,7 @@ public function compact(string $file, string $contents): string
1719
return $this->compactContent($contents);
1820
}
1921

20-
$this->compactContent($contents);
22+
return $this->compactContent($contents);
2123
}
2224

2325
protected function compactContent(string $contents): string
@@ -145,7 +147,6 @@ private function retokenizeAttribute(array &$tokens, int $opener): ?array
145147
{
146148
Assert::keyExists($tokens, $opener);
147149

148-
/** @var PhpToken $token */
149150
$token = $tokens[$opener];
150151
$attributeBody = mb_substr($token->text, 2);
151152
$subTokens = PhpToken::tokenize('<?php '.$attributeBody);

0 commit comments

Comments
 (0)