aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/Application.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2024-12-01 18:09:09 +0100
committerThomas Lange <code@nerdmind.de>2024-12-01 19:50:22 +0100
commit2ac4bdca2ab38990f891371282a3a17af290e78f (patch)
tree4383257740b3a4ae1800ac989d24234eefc0d8c2 /core/namespace/Application.php
parentebc5cf9ac20b959c6d4a6a34643eb8657cf9db84 (diff)
downloadblog-2ac4bdca2ab38990f891371282a3a17af290e78f.tar.gz
blog-2ac4bdca2ab38990f891371282a3a17af290e78f.tar.xz
blog-2ac4bdca2ab38990f891371282a3a17af290e78f.zip
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.
Diffstat (limited to 'core/namespace/Application.php')
-rw-r--r--core/namespace/Application.php12
1 files changed, 6 insertions, 6 deletions
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);
}