Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
224
Merge Requests
224
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
c1e2a47d
Commit
c1e2a47d
authored
Feb 24, 2014
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2204161
by sun: Remove deprecated drupal_valid_number_step().
parent
e9f61250
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
26 deletions
+3
-26
core/includes/common.inc
core/includes/common.inc
+0
-23
core/tests/Drupal/Tests/Component/Utility/NumberTest.php
core/tests/Drupal/Tests/Component/Utility/NumberTest.php
+3
-3
No files found.
core/includes/common.inc
View file @
c1e2a47d
...
...
@@ -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".
*/
...
...
core/tests/Drupal/Tests/Component/Utility/NumberTest.php
View file @
c1e2a47d
...
...
@@ -13,14 +13,14 @@
use
Drupal\Tests\UnitTestCase
;
/**
* Tests number step validation by
valid_number_s
tep().
* Tests number step validation by
Number::validS
tep().
*/
class
NumberTest
extends
UnitTestCase
{
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Number step validation'
,
'description'
=>
'Tests number step validation by
valid_number_s
tep()'
,
'description'
=>
'Tests number step validation by
Number::validS
tep()'
,
'group'
=>
'Common'
,
);
}
...
...
@@ -43,7 +43,7 @@ public function testValidStep($value, $step, $expected) {
}
/**
* Tests
valid_number_s
tep() with offset.
* Tests
Number::validS
tep() with offset.
*
* @param numeric $value
* The value argument for Number::validStep().
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment