Passed
Push — develop ( 629c3a...e7c784 )
by nguereza
03:51
created
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.
src/Handler/Error/Renderer/AbstractErrorRenderer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * @class AbstractErrorRenderer
56 56
  * @package Platine\Framework\Handler\Error\Renderer
57 57
  */
58
-abstract class AbstractErrorRenderer implements ErrorRenderInterface
59
-{
58
+abstract class AbstractErrorRenderer implements ErrorRenderInterface {
60 59
     /**
61 60
      * The default error title
62 61
      * @var string
Please login to merge, or discard this patch.
src/Handler/Error/Renderer/TextPlainErrorRenderer.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 TextPlainErrorRenderer
55 55
  * @package Platine\Framework\Handler\Error\Renderer
56 56
  */
57
-class TextPlainErrorRenderer extends AbstractErrorRenderer
58
-{
57
+class TextPlainErrorRenderer extends AbstractErrorRenderer {
59 58
     /**
60 59
      * {@inheritdoc}
61 60
      */
Please login to merge, or discard this patch.
src/Handler/Error/Renderer/JsonErrorRenderer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * @class JsonErrorRenderer
56 56
  * @package Platine\Framework\Handler\Error\Renderer
57 57
  */
58
-class JsonErrorRenderer extends AbstractErrorRenderer
59
-{
58
+class JsonErrorRenderer extends AbstractErrorRenderer {
60 59
     /**
61 60
      * {@inheritdoc}
62 61
      */
Please login to merge, or discard this patch.
src/Handler/Error/Renderer/XmlErrorRenderer.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 XmlErrorRenderer
55 55
  * @package Platine\Framework\Handler\Error\Renderer
56 56
  */
57
-class XmlErrorRenderer extends AbstractErrorRenderer
58
-{
57
+class XmlErrorRenderer extends AbstractErrorRenderer {
59 58
     /**
60 59
      * {@inheritdoc}
61 60
      */
Please login to merge, or discard this patch.
src/Handler/Error/Renderer/HtmlErrorRenderer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
  * @class HtmlErrorRenderer
56 56
  * @package Platine\Framework\Handler\Error\Renderer
57 57
  */
58
-class HtmlErrorRenderer extends AbstractErrorRenderer
59
-{
58
+class HtmlErrorRenderer extends AbstractErrorRenderer {
60 59
     /**
61 60
      * {@inheritdoc}
62 61
      */
Please login to merge, or discard this patch.
src/Handler/Error/ErrorHandlerInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
  * @class ErrorHandlerInterface
57 57
  * @package Platine\Framework\Handler\Error
58 58
  */
59
-interface ErrorHandlerInterface
60
-{
59
+interface ErrorHandlerInterface {
61 60
     /**
62 61
      * Handle error and generate the response
63 62
      * @param ServerRequestInterface $request
Please login to merge, or discard this patch.