Passed
Push — develop ( e3e306...5da5fd )
by nguereza
04:19 queued 01:01
created
src/Http/Middleware/RouteMatchMiddleware.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
  * @class RouteMatchMiddleware
61 61
  * @package Platine\Framework\Http\Middleware
62 62
  */
63
-class RouteMatchMiddleware implements MiddlewareInterface
64
-{
63
+class RouteMatchMiddleware implements MiddlewareInterface {
65 64
     /**
66 65
      * The Router instance
67 66
      * @var Router
@@ -79,8 +78,7 @@  discard block
 block discarded – undo
79 78
      * @param Router $router
80 79
      * @param array<string>  $allowedMethods the default allowed methods
81 80
      */
82
-    public function __construct(Router $router, array $allowedMethods = ['HEAD'])
83
-    {
81
+    public function __construct(Router $router, array $allowedMethods = ['HEAD']) {
84 82
         $this->router = $router;
85 83
 
86 84
         foreach ($allowedMethods as $method) {
Please login to merge, or discard this patch.
src/Http/Middleware/RouteDispatcherMiddleware.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
  * @class RouteDispatcherMiddleware
60 60
  * @package Platine\Framework\Http\Middleware
61 61
  */
62
-class RouteDispatcherMiddleware implements MiddlewareInterface
63
-{
62
+class RouteDispatcherMiddleware implements MiddlewareInterface {
64 63
     /**
65 64
      * The Middleware resolver instance
66 65
      * @var MiddlewareResolverInterface
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
      * Create new instance
72 71
      * @param MiddlewareResolverInterface $resolver
73 72
      */
74
-    public function __construct(MiddlewareResolverInterface $resolver)
75
-    {
73
+    public function __construct(MiddlewareResolverInterface $resolver) {
76 74
         $this->resolver = $resolver;
77 75
     }
78 76
 
Please login to merge, or discard this patch.
src/Http/Response/TemplateResponse.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
  * @class TemplateResponse
55 55
  * @package Platine\Framework\Http\Response
56 56
  */
57
-class TemplateResponse extends Response
58
-{
57
+class TemplateResponse extends Response {
59 58
     /**
60 59
      * The template instance
61 60
      * @var Template
Please login to merge, or discard this patch.
src/Http/Response/RestResponse.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
  * @class RestResponse
52 52
  * @package Platine\Framework\Http\Response
53 53
  */
54
-class RestResponse extends JsonResponse
55
-{
54
+class RestResponse extends JsonResponse {
56 55
     /**
57 56
      * Create new instance
58 57
      * @param mixed $data
Please login to merge, or discard this patch.
src/Http/Response/JsonResponse.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
  * @class JsonResponse
55 55
  * @package Platine\Framework\Http\Response
56 56
  */
57
-class JsonResponse extends Response
58
-{
57
+class JsonResponse extends Response {
59 58
     /**
60 59
      * Create new instance
61 60
      * @param mixed $data
Please login to merge, or discard this patch.
src/Http/Emitter/EmitterInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
  * @class EmitterInterface
55 55
  * @package Platine\Framework\Http\Emitter
56 56
  */
57
-interface EmitterInterface
58
-{
57
+interface EmitterInterface {
59 58
     /**
60 59
      * Emits a HTTP response, that including status line, headers and message
61 60
      * body, according to the environment.
Please login to merge, or discard this patch.
src/Http/RequestData.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
  * @class RequestData
55 55
  * @package Platine\Framework\Http
56 56
  */
57
-class RequestData
58
-{
57
+class RequestData {
59 58
     /**
60 59
      * The request body or post data
61 60
      * @var array<string, mixed>
@@ -96,8 +95,7 @@  discard block
 block discarded – undo
96 95
      * Create new instance
97 96
      * @param ServerRequestInterface $request
98 97
      */
99
-    public function __construct(ServerRequestInterface $request)
100
-    {
98
+    public function __construct(ServerRequestInterface $request) {
101 99
         $this->posts = (array) $request->getParsedBody();
102 100
         $this->gets = $request->getQueryParams();
103 101
         $this->servers = $request->getServerParams();
@@ -169,8 +167,7 @@  discard block
 block discarded – undo
169 167
      *
170 168
      * @return mixed
171 169
      */
172
-    public function get(string $key, $default = null)
173
-    {
170
+    public function get(string $key, $default = null) {
174 171
         $gets = $this->applyInputClean($this->gets);
175 172
         return Arr::get($gets, $key, $default);
176 173
     }
@@ -182,8 +179,7 @@  discard block
 block discarded – undo
182 179
      *
183 180
      * @return mixed
184 181
      */
185
-    public function post(string $key, $default = null)
186
-    {
182
+    public function post(string $key, $default = null) {
187 183
         $posts = $this->applyInputClean($this->posts);
188 184
         return Arr::get($posts, $key, $default);
189 185
     }
@@ -195,8 +191,7 @@  discard block
 block discarded – undo
195 191
      *
196 192
      * @return mixed
197 193
      */
198
-    public function server(string $key, $default = null)
199
-    {
194
+    public function server(string $key, $default = null) {
200 195
         $servers = $this->applyInputClean($this->servers);
201 196
         return Arr::get($servers, $key, $default);
202 197
     }
@@ -208,8 +203,7 @@  discard block
 block discarded – undo
208 203
      *
209 204
      * @return mixed
210 205
      */
211
-    public function cookie(string $key, $default = null)
212
-    {
206
+    public function cookie(string $key, $default = null) {
213 207
         $cookies = $this->applyInputClean($this->cookies);
214 208
         return Arr::get($cookies, $key, $default);
215 209
     }
@@ -220,8 +214,7 @@  discard block
 block discarded – undo
220 214
      *
221 215
      * @return mixed
222 216
      */
223
-    public function file(string $key)
224
-    {
217
+    public function file(string $key) {
225 218
         $files = $this->files;
226 219
         return Arr::get($files, $key, null);
227 220
     }
@@ -231,8 +224,7 @@  discard block
 block discarded – undo
231 224
      * @param mixed $str
232 225
      * @return mixed
233 226
      */
234
-    protected function cleanInput($str)
235
-    {
227
+    protected function cleanInput($str) {
236 228
         if (is_array($str)) {
237 229
             return array_map([$this, 'cleanInput'], $str);
238 230
         }
Please login to merge, or discard this patch.
src/Http/RouteHelper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * @class RouteHelper
56 56
  * @package Platine\Framework\Http
57 57
  */
58
-class RouteHelper
59
-{
58
+class RouteHelper {
60 59
     /**
61 60
      * The router instance
62 61
      * @var Router
@@ -67,8 +66,7 @@  discard block
 block discarded – undo
67 66
      * Create new instance
68 67
      * @param Router $router
69 68
      */
70
-    public function __construct(Router $router)
71
-    {
69
+    public function __construct(Router $router) {
72 70
         $this->router = $router;
73 71
     }
74 72
 
Please login to merge, or discard this patch.
src/Handler/Error/ErrorHandler.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
  * @class ErrorHandler
64 64
  * @package Platine\Framework\Handler\Error
65 65
  */
66
-class ErrorHandler implements ErrorHandlerInterface
67
-{
66
+class ErrorHandler implements ErrorHandlerInterface {
68 67
     /**
69 68
      * The content type
70 69
      * @var string
@@ -123,8 +122,7 @@  discard block
 block discarded – undo
123 122
      * Create new instance
124 123
      * @param LoggerInterface $logger
125 124
      */
126
-    public function __construct(LoggerInterface $logger)
127
-    {
125
+    public function __construct(LoggerInterface $logger) {
128 126
         $this->logger = $logger;
129 127
 
130 128
         //Add default renderer
Please login to merge, or discard this patch.