Passed
Push — develop ( 16f1e2...139a3c )
by nguereza
02:42
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
     /**
61 60
      * The request body or post data
@@ -97,8 +96,7 @@  discard block
 block discarded – undo
97 96
      * Create new instance
98 97
      * @param ServerRequestInterface $request
99 98
      */
100
-    public function __construct(ServerRequestInterface $request)
101
-    {
99
+    public function __construct(ServerRequestInterface $request) {
102 100
         $this->posts = (array) $request->getParsedBody();
103 101
         $this->gets = $request->getQueryParams();
104 102
         $this->servers = $request->getServerParams();
@@ -170,8 +168,7 @@  discard block
 block discarded – undo
170 168
      *
171 169
      * @return mixed
172 170
      */
173
-    public function get(string $key, $default = null)
174
-    {
171
+    public function get(string $key, $default = null) {
175 172
         $gets = $this->applyInputClean($this->gets);
176 173
         return Arr::get($gets, $key, $default);
177 174
     }
@@ -183,8 +180,7 @@  discard block
 block discarded – undo
183 180
      *
184 181
      * @return mixed
185 182
      */
186
-    public function post(string $key, $default = null)
187
-    {
183
+    public function post(string $key, $default = null) {
188 184
         $posts = $this->applyInputClean($this->posts);
189 185
         return Arr::get($posts, $key, $default);
190 186
     }
@@ -196,8 +192,7 @@  discard block
 block discarded – undo
196 192
      *
197 193
      * @return mixed
198 194
      */
199
-    public function server(string $key, $default = null)
200
-    {
195
+    public function server(string $key, $default = null) {
201 196
         $servers = $this->applyInputClean($this->servers);
202 197
         return Arr::get($servers, $key, $default);
203 198
     }
@@ -209,8 +204,7 @@  discard block
 block discarded – undo
209 204
      *
210 205
      * @return mixed
211 206
      */
212
-    public function cookie(string $key, $default = null)
213
-    {
207
+    public function cookie(string $key, $default = null) {
214 208
         $cookies = $this->applyInputClean($this->cookies);
215 209
         return Arr::get($cookies, $key, $default);
216 210
     }
@@ -221,8 +215,7 @@  discard block
 block discarded – undo
221 215
      *
222 216
      * @return mixed
223 217
      */
224
-    public function file(string $key)
225
-    {
218
+    public function file(string $key) {
226 219
         $files = $this->files;
227 220
         return Arr::get($files, $key, null);
228 221
     }
@@ -232,8 +225,7 @@  discard block
 block discarded – undo
232 225
      * @param mixed $str
233 226
      * @return mixed
234 227
      */
235
-    protected function cleanInput($str)
236
-    {
228
+    protected function cleanInput($str) {
237 229
         if (is_array($str)) {
238 230
             return array_map([$this, 'cleanInput'], $str);
239 231
         }
Please login to merge, or discard this patch.