From cfc58018b517fa27a9c0f40d6d429bc9090ac383 Mon Sep 17 00:00:00 2001 From: Chi Date: Tue, 8 Nov 2016 18:06:18 +0300 Subject: [PATCH] Fixed typo. --- src/TwigExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TwigExtension.php b/src/TwigExtension.php index 0e6dad1..9bd311d 100644 --- a/src/TwigExtension.php +++ b/src/TwigExtension.php @@ -81,7 +81,7 @@ class TwigExtension extends \Twig_Extension { public function getFilters() { $filters = [ new \Twig_SimpleFilter('token_replace', [$this, 'tokenReplaceFilter']), - new \Twig_SimpleFilter('preg_replace', [$this, 'pregPeplaceFilter']), + new \Twig_SimpleFilter('preg_replace', [$this, 'pregReplaceFilter']), new \Twig_SimpleFilter('image_style', [$this, 'imageStyle']), ]; // PHP filter should be enabled in settings.php file. @@ -236,7 +236,7 @@ class TwigExtension extends \Twig_Extension { * @return string * The new text if matches are found, otherwise unchanged text. */ - public function pregPeplaceFilter($text, $pattern, $replacement) { + public function pregReplaceFilter($text, $pattern, $replacement) { return preg_replace('/' . preg_quote($pattern, '/') . '/', $replacement, $text); }