function Inspector::assertAllNotEmpty
Same name in other branches
- 9 core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllNotEmpty()
- 8.9.x core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllNotEmpty()
- 11.x core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllNotEmpty()
Asserts that all members are not empty.
Parameters
mixed $traversable: Variable to be examined.
Return value
bool TRUE if $traversable can be traversed and all members not empty.
1 call to Inspector::assertAllNotEmpty()
- InspectorTest::testAllNotEmpty in core/
tests/ Drupal/ Tests/ Component/ Assertion/ InspectorTest.php - Tests asserting all members are !empty().
File
-
core/
lib/ Drupal/ Component/ Assertion/ Inspector.php, line 278
Class
Namespace
Drupal\Component\AssertionCode
public static function assertAllNotEmpty($traversable) {
if (is_iterable($traversable)) {
foreach ($traversable as $member) {
if (empty($member)) {
return FALSE;
}
}
return TRUE;
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.