From 3e3a0a4e901dae34fc1f84400218fad9de783683 Mon Sep 17 00:00:00 2001 From: CodeLingoBot Date: Mon, 1 Apr 2019 10:51:05 +1300 Subject: [PATCH] Fix case of contants based on best practices from PSR2 Signed-off-by: CodeLingoBot --- application/controller/LoginController.php | 2 +- application/core/Request.php | 2 +- application/model/LoginModel.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controller/LoginController.php b/application/controller/LoginController.php index 5fdaaefe3..9a2a6a036 100644 --- a/application/controller/LoginController.php +++ b/application/controller/LoginController.php @@ -25,7 +25,7 @@ public function index() if (LoginModel::isUserLoggedIn()) { Redirect::home(); } else { - $data = array('redirect' => Request::get('redirect') ? Request::get('redirect') : NULL); + $data = array('redirect' => Request::get('redirect') ? Request::get('redirect') : null); $this->View->render('login/index', $data); } } diff --git a/application/core/Request.php b/application/core/Request.php index 4bf233d14..d57ec35e8 100644 --- a/application/core/Request.php +++ b/application/core/Request.php @@ -35,7 +35,7 @@ public static function post($key, $clean = false) */ public static function postCheckbox($key) { - return isset($_POST[$key]) ? 1 : NULL; + return isset($_POST[$key]) ? 1 : null; } /** diff --git a/application/model/LoginModel.php b/application/model/LoginModel.php index 047987cb9..0e57ba087 100644 --- a/application/model/LoginModel.php +++ b/application/model/LoginModel.php @@ -362,7 +362,7 @@ public static function deleteCookie($user_id = null) $sql = "UPDATE users SET user_remember_me_token = :user_remember_me_token WHERE user_id = :user_id LIMIT 1"; $sth = $database->prepare($sql); - $sth->execute(array(':user_remember_me_token' => NULL, ':user_id' => $user_id)); + $sth->execute(array(':user_remember_me_token' => null, ':user_id' => $user_id)); } // delete remember_me cookie in browser