[validation] Remove superfluous if-statement

This commit is contained in:
logmanoriginal 2017-08-06 13:45:24 +02:00
parent e4fa963bdf
commit 4924769549
1 changed files with 1 additions and 6 deletions

View File

@ -28,12 +28,7 @@ function validateData(&$data, $parameters){
};
$validateCheckboxValue = function($value){
$filteredValue = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
if(is_null($filteredValue))
return null;
return $filteredValue;
return filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
};
$validateListValue = function($value, $expectedValues){