From abdf84589968594e598fd5adaa69ec5e56edb1ad Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Tue, 23 Jun 2026 18:38:34 -0400 Subject: [PATCH] remove \ from global function calls --- flight/template/View.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/flight/template/View.php b/flight/template/View.php index 92a2d1b..63f2a8d 100644 --- a/flight/template/View.php +++ b/flight/template/View.php @@ -122,11 +122,11 @@ class View */ public function fetch(string $file, ?array $data = null): string { - \ob_start(); + ob_start(); $this->render($file, $data); - return \ob_get_clean(); + return ob_get_clean(); } /** @@ -136,7 +136,7 @@ class View */ public function exists(string $file): bool { - return \file_exists($this->getTemplate($file)); + return file_exists($this->getTemplate($file)); } /** @@ -166,13 +166,16 @@ class View */ public function e(string $str): string { - $value = \htmlentities($str); + $value = htmlentities($str); echo $value; + return $value; } - protected static function normalizePath(string $path, string $separator = DIRECTORY_SEPARATOR): string - { - return \str_replace(['\\', '/'], $separator, $path); + protected static function normalizePath( + string $path, + string $separator = DIRECTORY_SEPARATOR + ): string { + return str_replace(['\\', '/'], $separator, $path); } }