function Inspector::assertAllArrays

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllArrays()
  2. 10 core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllArrays()
  3. 11.x core/lib/Drupal/Component/Assertion/Inspector.php \Drupal\Component\Assertion\Inspector::assertAllArrays()

Asserts that all members are arrays.

Parameters

mixed $traversable: Variable to be examined.

Return value

bool TRUE if $traversable can be traversed and all members are arrays.

1 call to Inspector::assertAllArrays()
InspectorTest::testAssertAllArrays in core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php
Tests asserting all members are arrays.

File

core/lib/Drupal/Component/Assertion/Inspector.php, line 128

Class

Inspector
Generic inspections for the <a href="http://php.net/assert" target="_blank" class="php-manual" title="void assert(string $assertion [, string $description = &#039;&#039;, string $file, int $line]) Checks an assertion">assert</a>() statement.

Namespace

Drupal\Component\Assertion

Code

public static function assertAllArrays($traversable) {
    return static::assertAll('is_array', $traversable);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.