Code Duplication    Length = 8-9 lines in 7 locations

src/LightStack/Request.php 7 locations

@@ 260-267 (lines=8) @@
257
     *
258
     * @return mixed value for the key
259
     */
260
    public function get($uKey, $uDefault = null)
261
    {
262
        if (!isset($this->details["get"][$uKey])) {
263
            return $uDefault;
264
        }
265
266
        return $this->details["get"][$uKey];
267
    }
268
269
    /**
270
     * Gets an item from POST collection
@@ 277-284 (lines=8) @@
274
     *
275
     * @return mixed value for the key
276
     */
277
    public function post($uKey, $uDefault = null)
278
    {
279
        if (!isset($this->details["post"][$uKey])) {
280
            return $uDefault;
281
        }
282
283
        return $this->details["post"][$uKey];
284
    }
285
286
    /**
287
     * Gets an item from FILES collection
@@ 294-302 (lines=9) @@
291
     *
292
     * @return mixed value for the key
293
     */
294
    public function file($uKey, $uDefault = null)
295
    {
296
        if (!isset($this->details["files"][$uKey])) {
297
            return $uDefault;
298
        }
299
300
        return $this->details["files"][$uKey];
301
302
    }
303
304
    /**
305
     * Gets an item from GET/POST/FILE collections
@@ 331-339 (lines=9) @@
328
     *
329
     * @return mixed value for the key
330
     */
331
    public function server($uKey, $uDefault = null)
332
    {
333
        if (!isset($this->details["server"][$uKey])) {
334
            return $uDefault;
335
        }
336
337
        return $this->details["server"][$uKey];
338
339
    }
340
341
    /**
342
     * Gets an item from SESSION collection
@@ 349-357 (lines=9) @@
346
     *
347
     * @return mixed value for the key
348
     */
349
    public function session($uKey, $uDefault = null)
350
    {
351
        if (!isset($this->details["session"][$uKey])) {
352
            return $uDefault;
353
        }
354
355
        return $this->details["session"][$uKey];
356
357
    }
358
359
    /**
360
     * Gets an item from COOKIE collection
@@ 367-375 (lines=9) @@
364
     *
365
     * @return mixed value for the key
366
     */
367
    public function cookie($uKey, $uDefault = null)
368
    {
369
        if (!isset($this->details["cookies"][$uKey])) {
370
            return $uDefault;
371
        }
372
373
        return $this->details["cookies"][$uKey];
374
375
    }
376
377
    /**
378
     * Gets an item from HEADER collection
@@ 385-393 (lines=9) @@
382
     *
383
     * @return mixed value for the key
384
     */
385
    public function header($uKey, $uDefault = null)
386
    {
387
        if (!isset($this->details["headers"][$uKey])) {
388
            return $uDefault;
389
        }
390
391
        return $this->details["headers"][$uKey];
392
393
    }
394
395
    /**
396
     * Checks if item is in the specified collection