This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
44
{
45
$this->prepareOperator('$or');
46
47
$this->queryPartial['$or'] = array_merge(
48
$this->queryPartial['$or'],
49
$this->mapExpressions(...func_get_args())
50
);
51
52
return $this;
53
}
54
55
/**
56
* @return array
57
*/
58
public function getQueryPartial(): array
59
{
60
return $this->queryPartial;
61
}
62
63
/**
64
* @param string $operator
65
*/
66
private function prepareOperator(string $operator)
67
{
68
if (!isset($this->queryPartial[$operator])) {
69
$this->queryPartial[$operator] = [];
70
}
71
}
72
73
/**
74
* @param $expressions
75
*
76
* @return array
77
*/
78
private function mapExpressions($expressions): array
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.