Passed
Push — develop ( 96c308...e3a9b8 )
by nguereza
02:38
created
src/Http/Response/FileResponse.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,16 +55,14 @@
 block discarded – undo
55 55
  * @class FileResponse
56 56
  * @package Platine\Framework\Http\Response
57 57
  */
58
-class FileResponse extends Response
59
-{
58
+class FileResponse extends Response {
60 59
 
61 60
     /**
62 61
      * Create new instance
63 62
      * @param string $path
64 63
      * @param string|null $filename
65 64
      */
66
-    public function __construct(string $path, ?string $filename = null)
67
-    {
65
+    public function __construct(string $path, ?string $filename = null) {
68 66
         parent::__construct(200);
69 67
 
70 68
         $realpath = Path::realPath($path);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 
83 83
         $this->headers['Content-Description'] = ['File Transfer'];
84 84
         $this->headers['Content-Type'] = [$mimetype];
85
-        $this->headers['Content-Disposition'] = ['attachment; filename="' . $filename  . '"'];
85
+        $this->headers['Content-Disposition'] = ['attachment; filename="' . $filename . '"'];
86 86
         $this->headers['Expires'] = ['0'];
87 87
         $this->headers['Cache-Control'] = ['must-revalidate'];
88 88
         $this->headers['Pragma'] = ['public'];
Please login to merge, or discard this patch.
src/Service/Provider/SecurityServiceProvider.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 SecurityServiceProvider
55 55
  * @package Platine\Framework\Service\Provider
56 56
  */
57
-class SecurityServiceProvider extends ServiceProvider
58
-{
57
+class SecurityServiceProvider extends ServiceProvider {
59 58
 
60 59
     /**
61 60
      * {@inheritdoc}
Please login to merge, or discard this patch.
src/Template/Tag/CsrfTag.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@
 block discarded – undo
57 57
  * @class CsrfTag
58 58
  * @package Platine\Framework\Template\Tag
59 59
  */
60
-class CsrfTag extends AbstractTag
61
-{
60
+class CsrfTag extends AbstractTag {
62 61
 
63 62
     /**
64 63
      * {@inheritdoc}
Please login to merge, or discard this patch.
src/Helper/Flash.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
  * @class Flash
54 54
  * @package Platine\Framework\Helper
55 55
  */
56
-class Flash
57
-{
56
+class Flash {
58 57
 
59 58
     /**
60 59
      * The session instance
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
      * Create new instance
67 66
      * @param Session $session
68 67
      */
69
-    public function __construct(Session $session)
70
-    {
68
+    public function __construct(Session $session) {
71 69
         $this->session = $session;
72 70
     }
73 71
 
Please login to merge, or discard this patch.
src/Http/Middleware/CorsMiddleware.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
  * @package Platine\Framework\Http\Middleware
62 62
  * @template T
63 63
  */
64
-class CorsMiddleware implements MiddlewareInterface
65
-{
64
+class CorsMiddleware implements MiddlewareInterface {
66 65
 
67 66
     /**
68 67
      * The configuration instance
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -162,14 +162,14 @@
 block discarded – undo
162 162
     {
163 163
         if ($this->isPreflight()) {
164 164
             $this->setOrigin()
165
-                 ->setMaxAge()
166
-                 ->setAllowCredentials()
167
-                 ->setAllowMethods()
168
-                 ->setAllowHeaders();
165
+                    ->setMaxAge()
166
+                    ->setAllowCredentials()
167
+                    ->setAllowMethods()
168
+                    ->setAllowHeaders();
169 169
         } else {
170 170
             $this->setOrigin()
171
-                 ->setExposedHeaders()
172
-                 ->setAllowCredentials();
171
+                    ->setExposedHeaders()
172
+                    ->setAllowCredentials();
173 173
         }
174 174
     }
175 175
 
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
     /**
61 60
      * Create new instance
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
     /**
61 60
      * The template instance
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
     /**
58 57
      * Create new instance
Please login to merge, or discard this patch.
src/Http/Middleware/BodyParserMiddleware.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,11 +139,11 @@
 block discarded – undo
139 139
      */
140 140
     protected function registerDefaultParsers(): void
141 141
     {
142
-        $this->registerParser('application/json', static function ($body) {
142
+        $this->registerParser('application/json', static function($body) {
143 143
             return Json::decode($body, true);
144 144
         });
145 145
 
146
-        $this->registerParser('application/x-www-form-urlencoded', static function ($body) {
146
+        $this->registerParser('application/x-www-form-urlencoded', static function($body) {
147 147
             $data = [];
148 148
             parse_str($body, $data);
149 149
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
         }
165 165
 
166 166
         if (!$this->hasParser($contentType)) {
167
-             // If not, look for a media type with a structured syntax suffix (RFC 6839)
167
+                // If not, look for a media type with a structured syntax suffix (RFC 6839)
168 168
             $parts = explode('+', $contentType);
169 169
 
170 170
             if (count($parts) >= 2) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
  * @class BodyParserMiddleware
59 59
  * @package Platine\Framework\Http\Middleware
60 60
  */
61
-class BodyParserMiddleware implements MiddlewareInterface
62
-{
61
+class BodyParserMiddleware implements MiddlewareInterface {
63 62
 
64 63
     /**
65 64
      * List of body parser to use
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
     /**
71 70
      * Create new instance
72 71
      */
73
-    public function __construct()
74
-    {
72
+    public function __construct() {
75 73
         $this->registerDefaultParsers();
76 74
     }
77 75
 
@@ -156,8 +154,7 @@  discard block
 block discarded – undo
156 154
      * @param ServerRequestInterface $request
157 155
      * @return null|array<mixed>|object
158 156
      */
159
-    protected function parseBody(ServerRequestInterface $request)
160
-    {
157
+    protected function parseBody(ServerRequestInterface $request) {
161 158
         $contentType = $this->getRequestContentType($request);
162 159
         if ($contentType === null) {
163 160
             return null;
Please login to merge, or discard this patch.