Optimizations

- Settings parameter in group method are no longer optional.
- Updated README to contain PHP JSON-extension under requirements.
- Updated composer.json to include php json extension.
This commit is contained in:
Simon Sessingø
2018-08-31 01:40:21 +02:00
parent 6bdfe06223
commit 0ac7fd559a
6 changed files with 161 additions and 80 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ class SimpleRouter
* @return RouteGroup
* @throws InvalidArgumentException
*/
public static function group(array $settings = [], \Closure $callback): IGroupRoute
public static function group(array $settings, \Closure $callback): IGroupRoute
{
if (\is_callable($callback) === false) {
throw new InvalidArgumentException('Invalid callback provided. Only functions or methods supported');