Tidy up whitespace in DataList.php

This commit is contained in:
Loz Calver 2015-07-08 15:34:21 +01:00
parent 6ab151e8fa
commit dc594ef1e5

View File

@ -419,9 +419,9 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
$whereArguments = func_get_arg(0); $whereArguments = func_get_arg(0);
} elseif($numberFuncArgs == 2) { } elseif($numberFuncArgs == 2) {
$whereArguments[func_get_arg(0)] = func_get_arg(1); $whereArguments[func_get_arg(0)] = func_get_arg(1);
} else { } else {
throw new InvalidArgumentException('Incorrect number of arguments passed to exclude()'); throw new InvalidArgumentException('Incorrect number of arguments passed to exclude()');
} }
return $this->alterDataQuery(function($query, $list) use ($whereArguments) { return $this->alterDataQuery(function($query, $list) use ($whereArguments) {
$subquery = $query->disjunctiveGroup(); $subquery = $query->disjunctiveGroup();
@ -436,16 +436,16 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
$t = singleton($list->dataClass())->dbObject($field); $t = singleton($list->dataClass())->dbObject($field);
if($filterType) { if($filterType) {
$className = "{$filterType}Filter"; $className = "{$filterType}Filter";
} else { } else {
$className = 'ExactMatchFilter'; $className = 'ExactMatchFilter';
} }
if(!class_exists($className)){ if(!class_exists($className)){
$className = 'ExactMatchFilter'; $className = 'ExactMatchFilter';
array_unshift($modifiers, $filterType); array_unshift($modifiers, $filterType);
} }
$t = new $className($field, $value, $modifiers); $t = new $className($field, $value, $modifiers);
$t->apply($subquery); $t->apply($subquery);
} }
}); });
} }