mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 02:14:31 +02:00
Fixed some inspection issues.
This commit is contained in:
parent
eef26f7ae6
commit
639829f5c5
97 changed files with 305 additions and 185 deletions
|
@ -43,9 +43,11 @@ use App\Entity\PriceInformations\Pricedetail;
|
|||
use App\Entity\UserSystem\User;
|
||||
use App\Twig\AppExtension;
|
||||
use App\Twig\Sandbox\InheritanceSecurityPolicy;
|
||||
use InvalidArgumentException;
|
||||
use Twig\Environment;
|
||||
use Twig\Extension\SandboxExtension;
|
||||
use Twig\Extra\Intl\IntlExtension;
|
||||
use Twig\Loader\ArrayLoader;
|
||||
use Twig\Sandbox\SecurityPolicyInterface;
|
||||
|
||||
final class SandboxedTwigProvider
|
||||
|
@ -104,10 +106,10 @@ final class SandboxedTwigProvider
|
|||
public function getTwig(LabelOptions $options): Environment
|
||||
{
|
||||
if ('twig' !== $options->getLinesMode()) {
|
||||
throw new \InvalidArgumentException('The LabelOptions must explicitly allow twig via lines_mode = "twig"!');
|
||||
throw new InvalidArgumentException('The LabelOptions must explicitly allow twig via lines_mode = "twig"!');
|
||||
}
|
||||
|
||||
$loader = new \Twig\Loader\ArrayLoader([
|
||||
$loader = new ArrayLoader([
|
||||
'lines' => $options->getLines(),
|
||||
]);
|
||||
$twig = new Environment($loader);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue