mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-18 13:26:37 +00:00
remove unneeded string cast
This commit is contained in:
committed by
Fabien Potencier
parent
6cbbe7cc4a
commit
5eff1b16ba
@@ -116,8 +116,6 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
*/
|
||||
public function displayParentBlock($name, array $context, array $blocks = array())
|
||||
{
|
||||
$name = (string) $name;
|
||||
|
||||
if (isset($this->traits[$name])) {
|
||||
$this->traits[$name][0]->displayBlock($name, $context, $blocks, false);
|
||||
} elseif (false !== $parent = $this->getParent($context)) {
|
||||
@@ -140,8 +138,6 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
*/
|
||||
public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true)
|
||||
{
|
||||
$name = (string) $name;
|
||||
|
||||
if ($useBlocks && isset($blocks[$name])) {
|
||||
$template = $blocks[$name][0];
|
||||
$block = $blocks[$name][1];
|
||||
@@ -226,7 +222,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
||||
*/
|
||||
public function hasBlock($name)
|
||||
{
|
||||
return isset($this->blocks[(string) $name]);
|
||||
return isset($this->blocks[$name]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user