diff --git a/core/includes/common.inc b/core/includes/common.inc index eb6621e9c8361df026e300c6b70db5b9d861eb26..4bb4a2fa25ba2cee462391f5ea0598a3156f2ac1 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 71db0985363d3fac8ac592cab8d6f38e97b15dff..06daa254e4fcd9c285c44295f569cba03e336e20 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().