Passed
Push — feature/optimize ( 219eef...0e0305 )
by Fu
03:34
created

ParserSearchFieldsTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A parserSearchFields() 0 7 3
1
<?php
2
3
4
namespace Modules\Core\Traits\Criteria;
5
6
7
trait ParserSearchFieldsTrait
8
{
9
    protected function parserSearchFields()
10
    {
11
        $this->searchFields =
0 ignored issues
show
Bug Best Practice introduced by
The property searchFields does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
12
            $this->request->get(config('repository.criteria.params.searchFields', 'searchFields'), null);
13
14
        if (!is_array($this->searchFields) && !is_null($this->searchFields)) {
15
            $this->searchFields = explode(';', $this->searchFields);
16
        }
17
    }
18
}