From c1e2a47dcc4a38eb74f5547b04d50fbabcb0cb80 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Mon, 24 Feb 2014 14:51:32 -0800 Subject: [PATCH] Issue #2204161 by sun: Remove deprecated drupal_valid_number_step(). --- core/includes/common.inc | 23 ------------------- .../Tests/Component/Utility/NumberTest.php | 6 ++--- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/core/includes/common.inc b/core/includes/common.inc index eb6621e9c836..4bb4a2fa25ba 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -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". */ diff --git a/core/tests/Drupal/Tests/Component/Utility/NumberTest.php b/core/tests/Drupal/Tests/Component/Utility/NumberTest.php index 71db0985363d..06daa254e4fc 100644 --- a/core/tests/Drupal/Tests/Component/Utility/NumberTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/NumberTest.php @@ -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(). -- GitLab