DASPRiD / Dash

Flexible PSR-7 compliant HTTP router
BSD 2-Clause "Simplified" License
29 stars 9 forks source link

`RouteCollection#insert()` uses slow lazy check to validate parameters #6

Closed Ocramius closed 10 years ago

Ocramius commented 10 years ago

RouteCollection#insert() could be faster by swapping the check with:

if (!($route instanceof RouteInterface || is_array($route))) {
}