Skip to content

Commit adb3ea9

Browse files
committed
fix
1 parent d33f03e commit adb3ea9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Drivers/PhpDriver.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ public function getTranslationsInNamespace(string $locale, string $namespace): a
8989
if ($this->storage->exists($path)) {
9090
$content = $this->storage->get($path);
9191

92-
return eval("?>{$content}");
92+
return eval(
93+
str($content)
94+
->after('<?php')
95+
->after('declare(strict_types=1);')
96+
->value()
97+
);
9398
}
9499

95100
return [];

0 commit comments

Comments
 (0)