From f7fb221f4eb4d5c4891e266ccbc474a377d45c4f Mon Sep 17 00:00:00 2001 From: "Bruno O. Notario" Date: Tue, 20 Jul 2021 19:19:26 -0300 Subject: [PATCH] Minor changes --- public_html/index.php | 3 ++- system/caches/caches.php | 17 ++++++++++++++++- system/system.php | 7 +++++-- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/public_html/index.php b/public_html/index.php index 651cb25..342c6e9 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -1,7 +1,7 @@ dirCache . preg_replace('/[^A-Z0-9\._-]/i', '', $key) . '.cache'); @@ -155,6 +163,7 @@ final class Caches { } } + /** @return true */ public function deleteAll() { $files = glob($this->dirCache . '*.cache'); @@ -165,13 +174,15 @@ final class Caches { return true; } + /** @return bool */ public function clear() { return $this->deleteAll(); } + /** @return Phacil\Framework\stdClass */ public function stats() { - $obj = new stdClass(); + $obj = new \stdClass(); $obj->size = $this->GetDirectorySize($this->dirCache); $obj->info = NULL; @@ -181,6 +192,10 @@ final class Caches { return $obj; } + /** + * @param string $path + * @return float|int + */ private function GetDirectorySize($path){ $bytestotal = 0; $path = realpath($path); diff --git a/system/system.php b/system/system.php index 3808756..c88c71d 100644 --- a/system/system.php +++ b/system/system.php @@ -11,9 +11,11 @@ namespace Phacil\Framework; use Exception; use TypeError; +/** + * + * @package Phacil\Framework + */ class startEngineExacTI { - /*public $constants; - public $userConstants;*/ /** * @@ -240,6 +242,7 @@ $loader = new Loader($engine->registry); $engine->registry->set('load', $loader); // Config +/** @var Config */ $config = new Config(); $engine->registry->set('config', $config);