| @@ -91,7 +91,7 @@ | ||
| 91 | 91 | $path = $this->getPath($uri->getPath()); | 
| 92 | 92 | $request = $request->withUri($uri->withPath($path)); | 
| 93 | 93 | |
| 94 | -        $generator = function ($path) { | |
| 94 | +        $generator = function($path) { | |
| 95 | 95 | return Utils\Helpers::joinPath($this->basePath, $path); | 
| 96 | 96 | }; | 
| 97 | 97 | |
| @@ -113,13 +113,13 @@ | ||
| 113 | 113 | |
| 114 | 114 | $value = $this->encrypt(time()); | 
| 115 | 115 | |
| 116 | -        $generator = function () use ($value) { | |
| 116 | +        $generator = function() use ($value) { | |
| 117 | 117 | return '<input type="hidden" name="'.$this->inputName.'" value="'.$value.'">'; | 
| 118 | 118 | }; | 
| 119 | 119 | |
| 120 | 120 | $response = $next($request, $response); | 
| 121 | 121 | |
| 122 | -        return $this->insertIntoPostForms($response, function ($match) use ($generator) { | |
| 122 | +        return $this->insertIntoPostForms($response, function($match) use ($generator) { | |
| 123 | 123 | return $match[0].$generator(); | 
| 124 | 124 | }); | 
| 125 | 125 | } | 
| @@ -90,13 +90,13 @@ | ||
| 90 | 90 | return $response->withStatus(403); | 
| 91 | 91 | } | 
| 92 | 92 | |
| 93 | -        $generator = function () { | |
| 93 | +        $generator = function() { | |
| 94 | 94 | return '<input type="text" name="'.$this->inputName.'" class="'.$this->inputClass.'">'; | 
| 95 | 95 | }; | 
| 96 | 96 | |
| 97 | 97 | $response = $next($request, $response); | 
| 98 | 98 | |
| 99 | -        return $this->insertIntoPostForms($response, function ($match) use ($generator) { | |
| 99 | +        return $this->insertIntoPostForms($response, function($match) use ($generator) { | |
| 100 | 100 | return $match[0].$generator(); | 
| 101 | 101 | }); | 
| 102 | 102 | } | 
| @@ -148,7 +148,7 @@ | ||
| 148 | 148 | return $response; | 
| 149 | 149 | |
| 150 | 150 | case 'html': | 
| 151 | -                $generator = function ($path, $transform) { | |
| 151 | +                $generator = function($path, $transform) { | |
| 152 | 152 | $info = pathinfo($path); | 
| 153 | 153 | |
| 154 | 154 |                      if (!isset($this->sizes[$transform])) { | 
| @@ -92,7 +92,7 @@ | ||
| 92 | 92 |              throw new InvalidArgumentException('Invalid callable provided'); | 
| 93 | 93 | } | 
| 94 | 94 | |
| 95 | -        return function (RequestInterface $request, ResponseInterface $response, callable $next) use ($basePath, $factory) { | |
| 95 | +        return function(RequestInterface $request, ResponseInterface $response, callable $next) use ($basePath, $factory) { | |
| 96 | 96 |              if (strlen($basePath) > 0 && strpos($request->getUri()->getPath(), $basePath) !== 0) { | 
| 97 | 97 | $middleware = false; | 
| 98 | 98 |              } else { | 
| @@ -79,7 +79,7 @@ | ||
| 79 | 79 | * @param callable|string $basePath The base path in which the middleware is created (optional) | 
| 80 | 80 | * @param callable $factory Takes no argument and MUST return a middleware callable or false | 
| 81 | 81 | * | 
| 82 | - * @return callable | |
| 82 | + * @return \Closure | |
| 83 | 83 | */ | 
| 84 | 84 | public static function create($basePath, callable $factory = null) | 
| 85 | 85 |      { | 
| @@ -75,7 +75,7 @@ discard block | ||
| 75 | 75 | return $response->withStatus(403); | 
| 76 | 76 | } | 
| 77 | 77 | |
| 78 | -        $generator = function ($action = null) use ($request, &$tokens) { | |
| 78 | +        $generator = function($action = null) use ($request, &$tokens) { | |
| 79 | 79 |              if (empty($action)) { | 
| 80 | 80 | $action = $request->getUri()->getPath(); | 
| 81 | 81 | } | 
| @@ -91,7 +91,7 @@ discard block | ||
| 91 | 91 | |
| 92 | 92 | $response = $next($request, $response); | 
| 93 | 93 | |
| 94 | -        return $this->insertIntoPostForms($response, function ($match) use ($generator) { | |
| 94 | +        return $this->insertIntoPostForms($response, function($match) use ($generator) { | |
| 95 | 95 |              preg_match('/action=["\']?([^"\'\s]+)["\']?/i', $match[0], $matches); | 
| 96 | 96 | |
| 97 | 97 | return $match[0].$generator(isset($matches[1]) ? $matches[1] : null); | 
| @@ -41,7 +41,7 @@ | ||
| 41 | 41 | */ | 
| 42 | 42 | public static function fromFile(\SplFileObject $file) | 
| 43 | 43 |      { | 
| 44 | - $schema = (object)[ | |
| 44 | + $schema = (object) [ | |
| 45 | 45 | '$ref' => $file->getPathname(), | 
| 46 | 46 | ]; | 
| 47 | 47 | |