From e819ad018b685ad4b396c18ad32cd191a462f21d Mon Sep 17 00:00:00 2001 From: Andrey Savchenko Date: Tue, 30 Jan 2018 18:36:50 +0200 Subject: [PATCH] Removed redundant string length call. --- src/Type_Template_Hierarchy.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Type_Template_Hierarchy.php b/src/Type_Template_Hierarchy.php index 874e077..3393f9f 100644 --- a/src/Type_Template_Hierarchy.php +++ b/src/Type_Template_Hierarchy.php @@ -61,9 +61,7 @@ public function template_hierarchy( $templates ) { $twig_templates = []; foreach ( $templates as $php_template ) { - - if ( '.php' === substr( $php_template, \strlen( $php_template ) - 4 ) ) { - + if ( '.php' === substr( $php_template, - 4 ) ) { $twig_templates[] = substr( $php_template, 0, - 4 ) . '.twig'; } }