Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Component / Assertion / Inspector.php
index 17cd434cfe1c787ffd5d00d4eb27d580f31b8c25..dbf3f511c18ecb6a78b1aceab9b5e0c64353b1bd 100644 (file)
@@ -13,7 +13,7 @@ use Traversable;
  *
  * Example call:
  * @code
- *   assert('Drupal\\Component\\Assertion\\Inspector::assertAllStrings($array)');
+ *   assert(Inspector::assertAllStrings($array));
  * @endcode
  *
  * @ingroup php_assert
@@ -187,8 +187,8 @@ class Inspector {
    * As an example, this assertion tests for the keys of a theme registry.
    *
    * @code
-   *   assert('Drupal\\Component\\Assertion\\Inspector::assertAllHaveKey(
-   *     $arrayToTest, "type", "theme path", "function", "template", "variables", "render element", "preprocess functions")');
+   *   assert(Inspector::assertAllHaveKey(
+   *     $arrayToTest, "type", "theme path", "function", "template", "variables", "render element", "preprocess functions"));
    * @endcode
    *
    * Note: If a method requires certain keys to be present it will usually be
@@ -375,16 +375,13 @@ class Inspector {
    * Here are some examples:
    * @code
    *   // Just test all are objects, like a cache.
-   *   assert('Drupal\\Component\\Assertion\\Inspector::assertAllObjects(
-   *     $collection');
+   *   assert(Inspector::assertAllObjects($collection));
    *
    *   // Test if traversable objects (arrays won't pass this)
-   *   assert('Drupal\\Component\\Assertion\\Inspector::assertAllObjects(
-   *     $collection', \'\\Traversable\');
+   *   assert(Inspector::assertAllObjects($collection, '\\Traversable'));
    *
    *   // Test for the Foo class or Bar\None interface
-   *   assert('Drupal\\Component\\Assertion\\Inspector::assertAllObjects(
-   *     $collection', \'\\Foo\', \'\\Bar\\None\'');
+   *   assert(Inspector::assertAllObjects($collection, '\\Foo', '\\Bar\\None'));
    * @endcode
    *
    * @param mixed $traversable