Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Component/Assertion/Inspector.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/core/lib/Drupal/Component/Assertion/Inspector.php Mon Apr 23 09:33:26 2018 +0100 +++ b/core/lib/Drupal/Component/Assertion/Inspector.php Mon Apr 23 09:46:53 2018 +0100 @@ -13,7 +13,7 @@ * * Example call: * @code - * assert('Drupal\\Component\\Assertion\\Inspector::assertAllStrings($array)'); + * assert(Inspector::assertAllStrings($array)); * @endcode * * @ingroup php_assert @@ -187,8 +187,8 @@ * 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 @@ * 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