mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 12:26:30 +00:00
Cleanups
This commit is contained in:
@@ -36,7 +36,6 @@ class Twig_Error extends Exception
|
|||||||
private $lineno;
|
private $lineno;
|
||||||
private $name;
|
private $name;
|
||||||
private $rawMessage;
|
private $rawMessage;
|
||||||
|
|
||||||
private $sourcePath;
|
private $sourcePath;
|
||||||
private $sourceCode;
|
private $sourceCode;
|
||||||
|
|
||||||
@@ -94,16 +93,6 @@ class Twig_Error extends Exception
|
|||||||
return $this->rawMessage;
|
return $this->rawMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the logical name where the error occurred.
|
|
||||||
*
|
|
||||||
* @return string The name
|
|
||||||
*/
|
|
||||||
public function getTemplateName()
|
|
||||||
{
|
|
||||||
return $this->name;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the template line where the error occurred.
|
* Gets the template line where the error occurred.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -634,7 +634,7 @@ class Twig_ExpressionParser
|
|||||||
$message .= sprintf('. Use "%s" instead', $test->getAlternative());
|
$message .= sprintf('. Use "%s" instead', $test->getAlternative());
|
||||||
}
|
}
|
||||||
$src = $stream->getSourceContext();
|
$src = $stream->getSourceContext();
|
||||||
$message .= sprintf(' in %s at line %d.', $src->getPath() ? $src->getPath() : $src->getName(), $stream->getCurrent()->getLine());
|
$message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $stream->getCurrent()->getLine());
|
||||||
|
|
||||||
@trigger_error($message, E_USER_DEPRECATED);
|
@trigger_error($message, E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
@@ -660,7 +660,7 @@ class Twig_ExpressionParser
|
|||||||
$message .= sprintf('. Use "%s" instead', $function->getAlternative());
|
$message .= sprintf('. Use "%s" instead', $function->getAlternative());
|
||||||
}
|
}
|
||||||
$src = $this->parser->getStream()->getSourceContext();
|
$src = $this->parser->getStream()->getSourceContext();
|
||||||
$message .= sprintf(' in %s at line %d.', $src->getPath() ? $src->getPath() : $src->getName(), $line);
|
$message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line);
|
||||||
|
|
||||||
@trigger_error($message, E_USER_DEPRECATED);
|
@trigger_error($message, E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
@@ -686,7 +686,7 @@ class Twig_ExpressionParser
|
|||||||
$message .= sprintf('. Use "%s" instead', $filter->getAlternative());
|
$message .= sprintf('. Use "%s" instead', $filter->getAlternative());
|
||||||
}
|
}
|
||||||
$src = $this->parser->getStream()->getSourceContext();
|
$src = $this->parser->getStream()->getSourceContext();
|
||||||
$message .= sprintf(' in %s at line %d.', $src->getPath() ? $src->getPath() : $src->getName(), $line);
|
$message .= sprintf(' in %s at line %d.', $src->getPath() ?: $src->getName(), $line);
|
||||||
|
|
||||||
@trigger_error($message, E_USER_DEPRECATED);
|
@trigger_error($message, E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user