diff --git a/src/Extension/CoreExtension.php b/src/Extension/CoreExtension.php index 5ff1e39ee..25371730b 100644 --- a/src/Extension/CoreExtension.php +++ b/src/Extension/CoreExtension.php @@ -539,11 +539,11 @@ function twig_replace_filter($str, $from, $to = null) */ function twig_round($value, $precision = 0, $method = 'common') { - if ('common' == $method) { + if ('common' === $method) { return round($value, $precision); } - if ('ceil' != $method && 'floor' != $method) { + if ('ceil' !== $method && 'floor' !== $method) { throw new RuntimeError('The round filter only supports the "common", "ceil", and "floor" methods.'); } @@ -1504,7 +1504,7 @@ function twig_to_array($seq, $preserveKeys = true) function twig_test_empty($value) { if ($value instanceof \Countable) { - return 0 == \count($value); + return 0 === \count($value); } if ($value instanceof \Traversable) {