33namespace Lord \Laroute \Routes ;
44
55use Illuminate \Routing \Route ;
6- use Illuminate \Routing \RouteCollection ;
6+ use Illuminate \Routing \RouteCollectionInterface ;
77use Illuminate \Support \Arr ;
88use Lord \Laroute \Routes \Exceptions \ZeroRoutesException ;
99
1010class Collection extends \Illuminate \Support \Collection
1111{
12- public function __construct (RouteCollection $ routes , $ filter , $ namespace )
12+ public function __construct (RouteCollectionInterface $ routes , $ filter , $ namespace )
1313 {
1414 $ this ->items = $ this ->parseRoutes ($ routes , $ filter , $ namespace );
1515 }
1616
1717 /**
1818 * Parse the routes into a jsonable output.
1919 *
20- * @param RouteCollection $routes
20+ * @param RouteCollectionInterface $routes
2121 * @param string $filter
2222 * @param string $namespace
2323 *
2424 * @return array
2525 * @throws ZeroRoutesException
2626 */
27- protected function parseRoutes (RouteCollection $ routes , $ filter , $ namespace )
27+ protected function parseRoutes (RouteCollectionInterface $ routes , $ filter , $ namespace )
2828 {
2929 $ this ->guardAgainstZeroRoutes ($ routes );
3030
@@ -40,11 +40,11 @@ protected function parseRoutes(RouteCollection $routes, $filter, $namespace)
4040 /**
4141 * Throw an exception if there aren't any routes to process
4242 *
43- * @param RouteCollection $routes
43+ * @param RouteCollectionInterface $routes
4444 *
4545 * @throws ZeroRoutesException
4646 */
47- protected function guardAgainstZeroRoutes (RouteCollection $ routes )
47+ protected function guardAgainstZeroRoutes (RouteCollectionInterface $ routes )
4848 {
4949 if (count ($ routes ) < 1 ) {
5050 throw new ZeroRoutesException ("You don't have any routes! " );
0 commit comments