Refactor the route finder.
This commit is contained in:
@@ -18,10 +18,7 @@ class Finder {
|
|||||||
*/
|
*/
|
||||||
public static function find($name, $routes)
|
public static function find($name, $routes)
|
||||||
{
|
{
|
||||||
if (array_key_exists($name, static::$names))
|
if (array_key_exists($name, static::$names)) return static::$names[$name];
|
||||||
{
|
|
||||||
return static::$names[$name];
|
|
||||||
}
|
|
||||||
|
|
||||||
$arrayIterator = new \RecursiveArrayIterator($routes);
|
$arrayIterator = new \RecursiveArrayIterator($routes);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user