From 5f95caecf5ad6c259def076c6ebaa5a42461206e Mon Sep 17 00:00:00 2001 From: "Bruno O. Notario" Date: Sat, 9 Apr 2022 20:02:59 -0300 Subject: [PATCH] Minor changes --- system/caches/caches.php | 11 ++--------- system/engine/debug.php | 4 ++-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/system/caches/caches.php b/system/caches/caches.php index f3665c6..e01822f 100644 --- a/system/caches/caches.php +++ b/system/caches/caches.php @@ -28,7 +28,7 @@ final class Caches { if (!file_exists($this->dirCache)) { mkdir($this->dirCache, 0760, true); } - $this->expire = (defined('CACHE_EXPIRE')) ? \Phacil\Framework\Config::CACHE_EXPIRE() : 3600; + $this->expire = \Phacil\Framework\Config::CACHE_EXPIRE() ?: 3600; } @@ -39,14 +39,7 @@ final class Caches { public function verify($key) { $files = $this->valid($key); - if ($files) { - - return true; - - } else { - - return false; - } + return ($files) ? true : false; } /** diff --git a/system/engine/debug.php b/system/engine/debug.php index 99c3744..2d89fca 100644 --- a/system/engine/debug.php +++ b/system/engine/debug.php @@ -35,8 +35,8 @@ class Debug public static function getRootPath() { if (self::$_filePath === null) { - if (defined('DIR_APPLICATION')) { - self::$_filePath = DIR_APPLICATION; + if (\Phacil\Framework\Config::DIR_APPLICATION()) { + self::$_filePath = \Phacil\Framework\Config::DIR_APPLICATION(); } else { self::$_filePath = dirname(__DIR__); }