You are here

function mymodule_libraries_info in Coder 8.3.x

Same name and namespace in other branches
  1. 8.3 tests/Drupal/Arrays/ArrayUnitTest.inc \mymodule_libraries_info()

Nested closure in an array should not throw errors.

File

tests/Drupal/Arrays/ArrayUnitTest.inc, line 116

Code

function mymodule_libraries_info() {
  $libraries['some-library'] = array(
    'xautoload' => function ($adapter) {

      /** @var \Drupal\xautoload\Adapter\LocalDirectoryAdapter $adapter */

      // Scan sites/all/libraries/some-library/composer.json to look for
      // autoload information.
      $adapter
        ->composerJson('composer.json');
    },
  );
  return $libraries;
}