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

ParserSearchFieldsTrait::parserSearchFields()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 4
nc 2
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
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
}