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');           // <---- THIS LINE
    },
  );
  return $libraries;
}

Array indentation error, expected 4 spaces but found 6

Comments

solideogloria created an issue. See original summary.

solideogloria’s picture

Moving the comment outside the function causes it to work, though:

    /** @var \Drupal\xautoload\Adapter\LocalDirectoryAdapter $adapter */
    // Scan sites/all/libraries/ssrs-sdk/composer.json to look for
    // autoload information.
    'xautoload' => function ($adapter) {
      $adapter->composerJson('composer.json');
    },

  • klausi committed 9514bd4 on 8.x-3.x
    fix(Array): Fix false positive for closure defined inside an array (#...
klausi’s picture

Status: Active » Fixed
Issue tags: +DevDaysTransylvania

Thanks so much for reporting! I pushed a fix with your test case.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.