Commit c1e2a47d authored by webchick's avatar webchick

Issue #2204161 by sun: Remove deprecated drupal_valid_number_step().

parent e9f61250
......@@ -622,29 +622,6 @@ function valid_url($url, $absolute = FALSE) {
return Url::isValid($url, $absolute);
}
/**
* Verifies that a number is a multiple of a given step.
*
* @see \Drupal\Component\Utility\Number::validStep()
*
* @param numeric $value
* The value that needs to be checked.
* @param numeric $step
* The step scale factor. Must be positive.
* @param numeric $offset
* (optional) An offset, to which the difference must be a multiple of the
* given step.
*
* @return bool
* TRUE if no step mismatch has occurred, or FALSE otherwise.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal\Component\Utility\Number::validStep().
*/
function valid_number_step($value, $step, $offset = 0.0) {
return Number::validStep($value, $step, $offset);
}
/**
* @} End of "defgroup validation".
*/
......
......@@ -13,14 +13,14 @@
use Drupal\Tests\UnitTestCase;
/**
* Tests number step validation by valid_number_step().
* Tests number step validation by Number::validStep().
*/
class NumberTest extends UnitTestCase {
public static function getInfo() {
return array(
'name' => 'Number step validation',
'description' => 'Tests number step validation by valid_number_step()',
'description' => 'Tests number step validation by Number::validStep()',
'group' => 'Common',
);
}
......@@ -43,7 +43,7 @@ public function testValidStep($value, $step, $expected) {
}
/**
* Tests valid_number_step() with offset.
* Tests Number::validStep() with offset.
*
* @param numeric $value
* The value argument for Number::validStep().
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment