From dc65475723f8fd7e542ba567d5ecb4f040b78c68 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 2 Feb 2015 17:25:24 -0700 Subject: [PATCH] PSR fixes --- system/src/Grav/Common/Utils.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index ecee736764..ac4f95f0ff 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -46,7 +46,8 @@ public static function mergeObjects($obj1, $obj2) * @param $dir * @return bool */ - public static function rrmdir($dir) { + public static function rrmdir($dir) + { $files = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST @@ -55,9 +56,13 @@ public static function rrmdir($dir) { /** @var \DirectoryIterator $fileinfo */ foreach ($files as $fileinfo) { if ($fileinfo->isDir()) { - if (false === rmdir($fileinfo->getRealPath())) return false; + if (false === rmdir($fileinfo->getRealPath())) { + return false; + } } else { - if (false === unlink($fileinfo->getRealPath())) return false; + if (false === unlink($fileinfo->getRealPath())) { + return false; + } } } @@ -74,7 +79,8 @@ public static function rrmdir($dir) { * @param bool $considerHtml * @return string */ - public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true) { + public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true) + { $open_tags = array(); if ($considerHtml) { // if the plain text is shorter than the maximum length, return the whole text