From: Jordi Boggiano Date: Fri, 13 Apr 2012 12:22:03 +0000 (+0200) Subject: Simplify code X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=70cca66c5a03d514983d84b5d678b461977d49a7;p=web%2Fkonrad%2Ftwig.git Simplify code --- diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 14fbca7..2b54a5c 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -986,7 +986,7 @@ else /* used internally */ function twig_ensure_traversable($seq) { - if (is_array($seq) || (is_object($seq) && $seq instanceof Traversable)) { + if (is_array($seq) || $seq instanceof Traversable) { return $seq; } else { return array(); @@ -1032,5 +1032,5 @@ function twig_test_empty($value) */ function twig_test_traversable($value) { - return is_array($value) || (is_object($value) && $value instanceof Traversable); + return is_array($value) || $value instanceof Traversable; }