diff --git a/src/Http/View/Engine/HtmlEngine.php b/src/Http/View/Engine/HtmlEngine.php
index c094be6..887e125 100644
--- a/src/Http/View/Engine/HtmlEngine.php
+++ b/src/Http/View/Engine/HtmlEngine.php
@@ -15,14 +15,11 @@ class HtmlEngine extends Render
$basePath = $_SERVER['DOCUMENT_ROOT'];
$viewsPath = app()->resourcePath('views/' . str_replace('.', '/', $this->view) . '.php');
- if (file_exists($viewsPath)) {
- extract($this->data);
-
- include $viewsPath;
-
- return;
+ if (!file_exists($viewsPath)) {
+ throw new \Exception('View not found');
}
- throw new \Exception('View not found');
+ extract($this->data);
+ include $viewsPath;
}
}
\ No newline at end of file
diff --git a/src/Routing/RouteCollection.php b/src/Routing/RouteCollection.php
index 75a8fe4..4579091 100644
--- a/src/Routing/RouteCollection.php
+++ b/src/Routing/RouteCollection.php
@@ -71,6 +71,7 @@ class RouteCollection
fn($key) => !is_numeric($key),
ARRAY_FILTER_USE_KEY
);
+
return $route;
}
}
diff --git a/src/Routing/Router.php b/src/Routing/Router.php
deleted file mode 100644
index 6d90c2a..0000000
--- a/src/Routing/Router.php
+++ /dev/null
@@ -1,22 +0,0 @@
-