mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-10 12:06:46 +00:00
Simplify code
This commit is contained in:
+4
-6
@@ -90,6 +90,10 @@ class Error extends \Exception
|
||||
|
||||
public function guess(): void
|
||||
{
|
||||
if ($this->lineno > -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->guessTemplateInfo();
|
||||
$this->updateRepr();
|
||||
}
|
||||
@@ -164,12 +168,6 @@ class Error extends \Exception
|
||||
}
|
||||
}
|
||||
|
||||
if ($template) {
|
||||
$this->source = $template->getSourceContext();
|
||||
} elseif ($this->lineno > -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
$r = new \ReflectionObject($template);
|
||||
$file = $r->getFileName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user