Skip to content

Commit

Permalink
Update ViolinistMessages.php
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm authored Jul 17, 2024
1 parent fc2a343 commit 6085f71
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/ViolinistMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ViolinistMessages
{

/**
* @var \Twig_Environment
* @var \Twig\Environment
*/
private $twig;

Expand All @@ -15,14 +15,8 @@ class ViolinistMessages
*/
public function __construct()
{
if (!class_exists('\Twig\Loader\FilesystemLoader')) {
$loader = new \Twig_Loader_Filesystem(__DIR__ . '/../templates');
$this->twig = new \Twig_Environment($loader);
} else {
// twig 3.
$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../templates');
$this->twig = new \Twig\Environment($loader, []);
}
$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../templates');
$this->twig = new \Twig\Environment($loader, []);
}

/**
Expand Down

0 comments on commit 6085f71

Please sign in to comment.