From 2ac4bdca2ab38990f891371282a3a17af290e78f Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Sun, 1 Dec 2024 18:09:09 +0100 Subject: PHP Keywords and types should be in lowercase Follow PSR-12 and use lowercase variants of PHP reserved keywords. See: https://www.php-fig.org/psr/psr-12/#25-keywords-and-types Find all uppercase occurrences of "or", "and", "null", "true" and "false" and change them to the lowercase variant. --- core/namespace/Application.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/namespace/Application.php') diff --git a/core/namespace/Application.php b/core/namespace/Application.php index 2d5a23c..3dee818 100644 --- a/core/namespace/Application.php +++ b/core/namespace/Application.php @@ -29,7 +29,7 @@ class Application { # Get configuration value #=============================================================================== public static function get($config) { - return self::$configuration[$config] ?? NULL; + return self::$configuration[$config] ?? null; } #=============================================================================== @@ -42,8 +42,8 @@ class Application { #=============================================================================== # Return singleton Database instance #=============================================================================== - public static function getDatabase($force = FALSE): Database { - if(!self::$Database instanceof Database OR $force === TRUE) { + public static function getDatabase($force = false): Database { + if(!self::$Database instanceof Database or $force === true) { $hostname = self::get('DATABASE.HOSTNAME'); $basename = self::get('DATABASE.BASENAME'); $username = self::get('DATABASE.USERNAME'); @@ -70,8 +70,8 @@ class Application { #=============================================================================== # Return singleton Language instance #=============================================================================== - public static function getLanguage($force = FALSE): Language { - if(!self::$Language instanceof Language OR $force === TRUE) { + public static function getLanguage($force = false): Language { + if(!self::$Language instanceof Language or $force === true) { $template_name = self::get('TEMPLATE.NAME'); $template_lang = self::get('TEMPLATE.LANG'); @@ -237,7 +237,7 @@ class Application { #=============================================================================== # Exit application with a custom message and status code #=============================================================================== - public static function exit(?string $message = NULL, int $code = 503): void { + public static function exit(?string $message = null, int $code = 503): void { http_response_code($code); exit($message); } -- cgit v1.2.3