Skip to content

Commit e614794

Browse files
committed
updates
1 parent 4b78267 commit e614794

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/Loader.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,16 @@ public function get_setting($setting)
7373
*/
7474
public function add_route_requirement($type, $function, $source = '', $path = false, $methods = false)
7575
{
76-
if ($path === false)
76+
if ($path === false) {
7777
$path = '/'.$function;
78-
if ($methods === false)
78+
}
79+
if ($methods === false) {
7980
$methods = ['GET', 'POST'];
81+
}
8082
$this->routes[$path] = [$type, $function, $methods];
81-
if ($source != '')
83+
if ($source != '') {
8284
$this->add_requirement($function, $source);
85+
}
8386
}
8487

8588
/**

0 commit comments

Comments
 (0)