Code Duplication    Length = 30-30 lines in 2 locations

src/Understand/UnderstandLaravel5/FieldProvider.php 2 locations

@@ 370-399 (lines=30) @@
367
    /**
368
     * @return array|null
369
     */
370
    protected function getQueryStringArray()
371
    {
372
        $enabled = $this->app['config']->get('understand-laravel.query_string_enabled');
373
374
        if ( ! $enabled)
375
        {
376
            return null;
377
        }
378
379
        if ( ! $this->request->query instanceof \IteratorAggregate)
380
        {
381
            return null;
382
        }
383
384
        $queryString = [];
385
386
        foreach($this->request->query as $key => $value)
387
        {
388
            try
389
            {
390
                $queryString[$key] = $this->parseRequestFieldValue($key, $value);
391
            }
392
            catch (\Exception $e)
393
            {
394
                $queryString[$key] = '[handler error]';
395
            }
396
        }
397
398
        return $queryString;
399
    }
400
401
    /**
402
     * @return array|null
@@ 404-433 (lines=30) @@
401
    /**
402
     * @return array|null
403
     */
404
    protected function getPostDataArray()
405
    {
406
        $enabled = $this->app['config']->get('understand-laravel.post_data_enabled');
407
408
        if ( ! $enabled)
409
        {
410
            return null;
411
        }
412
413
        if ( ! $this->request->request instanceof \IteratorAggregate)
414
        {
415
            return null;
416
        }
417
418
        $postData = [];
419
420
        foreach($this->request->request as $key => $value)
421
        {
422
            try
423
            {
424
                $postData[$key] = $this->parseRequestFieldValue($key, $value);
425
            }
426
            catch (\Exception $e)
427
            {
428
                $postData[$key] = '[handler error]';
429
            }
430
        }
431
432
        return $postData;
433
    }
434
435
    /**
436
     * @param $key