mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
simplified code
This commit is contained in:
@@ -121,8 +121,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
|
||||
$r = new ReflectionObject($callable);
|
||||
$r = $r->getMethod('__invoke');
|
||||
} elseif (is_string($callable) && false !== strpos($callable, '::')) {
|
||||
$parts = explode('::', $callable, 2);
|
||||
$r = new ReflectionMethod($parts[0], $parts[1]);
|
||||
$r = new ReflectionMethod($callable);
|
||||
} else {
|
||||
$r = new ReflectionFunction($callable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user