Refactor the route finder.
This commit is contained in:
parent
2aef4de8d5
commit
b25edfaf9b
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue