mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[CLEANUP] Cleaned up code
- Change variable $values to $settings in Route::setSettings method. - Added return types to methods. - Added type to method variables. - Change ClassNotFoundException so required parameters are first.
This commit is contained in:
@@ -461,7 +461,7 @@ class Router
|
||||
* @throws HttpException
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function handleRouteRewrite($key, string $url): ?string
|
||||
protected function handleRouteRewrite(string $key, string $url): ?string
|
||||
{
|
||||
/* If the request has changed */
|
||||
if ($this->request->hasPendingRewrite() === false) {
|
||||
@@ -874,7 +874,7 @@ class Router
|
||||
* @param string $name
|
||||
* @param array $arguments
|
||||
*/
|
||||
protected function fireEvents($name, array $arguments = []): void
|
||||
protected function fireEvents(string $name, array $arguments = []): void
|
||||
{
|
||||
if (\count($this->eventHandlers) === 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user