From 16d5f337c0a09183822a19ce244d02144ae848b6 Mon Sep 17 00:00:00 2001 From: bzick Date: Thu, 8 Jan 2015 12:44:38 +0300 Subject: [PATCH] Formatting --- src/Fenom/Modifier.php | 8 +++----- src/Fenom/Provider.php | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Fenom/Modifier.php b/src/Fenom/Modifier.php index abf6360..cf9fc57 100644 --- a/src/Fenom/Modifier.php +++ b/src/Fenom/Modifier.php @@ -107,11 +107,9 @@ class Modifier if (preg_match('#^(.{' . $length . '}).*?(.{' . $length . '})?$#usS', $string, $match)) { if (count($match) == 3) { if ($by_words) { - return preg_replace('#\s.*$#usS', "", $match[1]) . $etc . preg_replace( - '#.*\s#usS', - "", - $match[2] - ); + return preg_replace('#\s.*$#usS', "", $match[1]) . + $etc . + preg_replace('#.*\s#usS', "", $match[2]); } else { return $match[1] . $etc . $match[2]; } diff --git a/src/Fenom/Provider.php b/src/Fenom/Provider.php index e9b28fd..905b166 100644 --- a/src/Fenom/Provider.php +++ b/src/Fenom/Provider.php @@ -146,8 +146,8 @@ class Provider implements ProviderInterface */ protected function _getTemplatePath($tpl) { - - if (($path = realpath($this->_path . "/" . $tpl)) && strpos($path, $this->_path) === 0) { + $path = realpath($this->_path . "/" . $tpl); + if ($path && strpos($path, $this->_path) === 0) { return $path; } else { throw new \RuntimeException("Template $tpl not found");