From f60f330c9a25cdee1fd73736c50c8d440ffcf1c0 Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Thu, 11 Sep 2025 08:26:22 -0500 Subject: [PATCH] refactor for consistency --- context.php => Context.php | 10 +++++----- errorhandler.php => ErrorHandler.php | 0 methods.php => HTTPMethod.php | 0 request.php => Request.php | 0 response.php => Response.php | 0 router.php => Router.php | 0 session.php => Session.php | 0 validator.php => Validator.php | 0 web.php => Web.php | 12 ++++++------ auth/Auth.php | 6 +++--- 10 files changed, 14 insertions(+), 14 deletions(-) rename context.php => Context.php (96%) rename errorhandler.php => ErrorHandler.php (100%) rename methods.php => HTTPMethod.php (100%) rename request.php => Request.php (100%) rename response.php => Response.php (100%) rename router.php => Router.php (100%) rename session.php => Session.php (100%) rename validator.php => Validator.php (100%) rename web.php => Web.php (95%) diff --git a/context.php b/Context.php similarity index 96% rename from context.php rename to Context.php index 10918a8..9246c43 100644 --- a/context.php +++ b/Context.php @@ -1,7 +1,7 @@ validate($data, $rules, $messages); - + if ($validator->failed()) { throw new ValidationException($validator->errors()); } - + return $validator; } @@ -124,7 +124,7 @@ class Context $this->request->body, $this->request->params ); - + return $this->validate($data, $rules, $messages); } } diff --git a/errorhandler.php b/ErrorHandler.php similarity index 100% rename from errorhandler.php rename to ErrorHandler.php diff --git a/methods.php b/HTTPMethod.php similarity index 100% rename from methods.php rename to HTTPMethod.php diff --git a/request.php b/Request.php similarity index 100% rename from request.php rename to Request.php diff --git a/response.php b/Response.php similarity index 100% rename from response.php rename to Response.php diff --git a/router.php b/Router.php similarity index 100% rename from router.php rename to Router.php diff --git a/session.php b/Session.php similarity index 100% rename from session.php rename to Session.php diff --git a/validator.php b/Validator.php similarity index 100% rename from validator.php rename to Validator.php diff --git a/web.php b/Web.php similarity index 95% rename from web.php rename to Web.php index e41e051..abd2043 100644 --- a/web.php +++ b/Web.php @@ -1,11 +1,11 @@ generateRememberToken(); $hashedToken = hash('sha256', $token); - + $userData['remember_token'] = $hashedToken; $this->session->set('remember_user_data', $userData); @@ -249,4 +249,4 @@ class Auth $this->session->remove('remember_user_data'); $this->clearRememberCookie(); } -} \ No newline at end of file +}