src/QueryBuilderParser/QBPFunctions.php
Method makeArrayQueryIn
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function makeArrayQueryIn(EloquentBuilder|Builder $query, stdClass $rule, $operator, array $value, $condition)
Method makeQueryWhenArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected function makeQueryWhenArray(EloquentBuilder|Builder $query, stdClass $rule, array $sqlOperator, array $value, $condition)
Method makeArrayQueryBetween
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function makeArrayQueryBetween(EloquentBuilder|Builder $query, stdClass $rule, $operator, array $value, $condition)
Avoid variables with short names like $v. Configured minimum length is 3. Open
Open
return array_map(function ($v) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $operator == 'NOT BETWEEN' ) {
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
Open
protected function makeQueryWhenArray(EloquentBuilder|Builder $query, stdClass $rule, array $sqlOperator, array $value, $condition)
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
Open
private function makeArrayQueryBetween(EloquentBuilder|Builder $query, stdClass $rule, $operator, array $value, $condition)
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
Open
private function makeArrayQueryIn(EloquentBuilder|Builder $query, stdClass $rule, $operator, array $value, $condition)
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
return $query->whereNotBetween( $rule->field, $value, $condition );
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
return $query->whereNotBetween( $rule->field, $value, $condition );
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $operator == 'NOT BETWEEN' ) {
- Exclude checks