@@ -55,14 +55,6 @@ public function __construct(
5555 ) {
5656 }
5757
58- /**
59- * Attempts to match a URI path against Controllers and directories
60- * found in APPPATH/Controllers, to find a matching route.
61- *
62- * @param string $httpVerb HTTP verb like `GET`,`POST`
63- *
64- * @return array [directory_name, controller_name, controller_method, params]
65- */
6658 public function getRoute (string $ uri , string $ httpVerb ): array
6759 {
6860 $ segments = explode ('/ ' , $ uri );
@@ -95,7 +87,7 @@ public function getRoute(string $uri, string $httpVerb): array
9587 throw PageNotFoundException::forPageNotFound ();
9688 }
9789
98- /** @var array $params An array of params to the controller method. */
90+ /** @var list<string> $params An array of params to the controller method. */
9991 $ params = [];
10092
10193 if ($ segments !== []) {
@@ -177,11 +169,12 @@ public function setTranslateURIDashes(bool $val = false): self
177169 }
178170
179171 /**
180- * Scans the controller directory, attempting to locate a controller matching the supplied uri $segments
172+ * Scans the controller directory, attempting to locate a controller matching the supplied uri `$segments`.
173+ * Returns an array of remaining uri segments that don't map onto a directory.
181174 *
182- * @param array $segments URI segments
175+ * @param list<string> $segments URI segments
183176 *
184- * @return array returns an array of remaining uri segments that don't map onto a directory
177+ * @return list<string>
185178 */
186179 private function scanControllers (array $ segments ): array
187180 {
0 commit comments