Completed
Push — master ( 1635a7...6ef687 )
by Abdelrahman
02:47 queued 01:24
created

FormRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 18
rs 10
c 1
b 0
f 0
wmc 3
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getValidatorInstance() 0 12 3
1
<?php
2
3
/*
4
 * NOTICE OF LICENSE
5
 *
6
 * Part of the Rinvex Support Package.
7
 *
8
 * This source file is subject to The MIT License (MIT)
9
 * that is bundled with this package in the LICENSE file.
10
 *
11
 * Package: Rinvex Support Package
12
 * License: The MIT License (MIT)
13
 * Link:    https://rinvex.com
14
 */
15
16
namespace Rinvex\Support\Http\Requests;
17
18
use Illuminate\Foundation\Http\FormRequest as BaseFormRequest;
19
20
class FormRequest extends BaseFormRequest
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    protected function getValidatorInstance()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
26
    {
27
        if (method_exists($this, 'process')) {
28
            $this->replace($this->container->call([$this, 'process'], [$this->all()]));
29
        } else {
30
            $this->replace(array_filter(array_map(function ($item) {
31
                return is_string($item) ? trim($item) : $item;
32
            }, $this->all())));
33
        }
34
35
        return parent::getValidatorInstance();
36
    }
37
}
38