Skip to content

Commit

Permalink
Remove wrapper function
Browse files Browse the repository at this point in the history
  • Loading branch information
DanieliMi committed Jan 27, 2020
1 parent b2f9219 commit 8651d7a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions Model/CustomFields/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,9 @@ private function lengthIsValid($attribute)
return true;
}

$function = $this->convertSnakeToCamelCase('get_' . $attribute);
$function = $this->underscoreToCamelCase->filter('get_' . $attribute);
$value = call_user_func([$this->value, $function]);

return mb_strlen($value) <= $allowedLength;
}

/**
* @param $string
*
* @return string
*/
private function convertSnakeToCamelCase($string)
{
return $this->underscoreToCamelCase->filter($string);
}
}

0 comments on commit 8651d7a

Please sign in to comment.