function Inspector::assertAllNumeric
Same name in other branches
- 8.9.x core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllNumeric()
- 10 core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllNumeric()
- 11.x core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllNumeric()
Asserts all members are numeric data types or strings castable to such.
Parameters
mixed $traversable: Variable to be examined.
Return value
bool TRUE if $traversable can be traversed and all members are numeric.
1 call to Inspector::assertAllNumeric()
- InspectorTest::testAssertAllNumeric in core/
tests/ Drupal/ Tests/ Component/ Assertion/ InspectorTest.php - Tests asserting all arguments are numbers or strings castable to numbers.
File
-
core/
lib/ Drupal/ Component/ Assertion/ Inspector.php, line 293
Class
Namespace
Drupal\Component\AssertionCode
public static function assertAllNumeric($traversable) {
return static::assertAll('is_numeric', $traversable);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.