original_string: private function parseImports(array $content, $file)
      {
          if (!isset($content['imports'])) {
              return;
          }
  
          if (!is_array($content['imports'])) {
              throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $file));
          }
  
          $defaultDirectory = dirname($file);
          foreach ($content['imports'] as $import) {
              if (!is_array($import)) {
                  throw new InvalidArgumentException(sprintf('The values in the "imports" key should be arrays in %s. Check your YAML syntax.', $file));
              }
  
              $this->setCurrentDir($defaultDirectory);
              $this->import($import['resource'], null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file);
          }
      }
code: private function parseImports(array $content, $file)
      {
          if (!isset($content['imports'])) {
              return;
          }
  
          if (!is_array($content['imports'])) {
              throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in %s. Check your YAML syntax.', $file));
          }
  
          $defaultDirectory = dirname($file);
          foreach ($content['imports'] as $import) {
              if (!is_array($import)) {
                  throw new InvalidArgumentException(sprintf('The values in the "imports" key should be arrays in %s. Check your YAML syntax.', $file));
              }
  
              $this->setCurrentDir($defaultDirectory);
              $this->import($import['resource'], null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file);
          }
      }
code_tokens: private function parseImports ( array $ content , $ file ) { if ( ! isset ( $ content [ 'imports' ] ) ) { return ; } if ( ! is_array ( $ content [ 'imports' ] ) ) { throw new InvalidArgumentException ( sprintf ( 'The "imports" key should contain an array in %s. Check your YAML syntax.' , $ file ) ) ; } $ defaultDirectory = dirname ( $ file ) ; foreach ( $ content [ 'imports' ] as $ import ) { if ( ! is_array ( $ import ) ) { throw new InvalidArgumentException ( sprintf ( 'The values in the "imports" key should be arrays in %s. Check your YAML syntax.' , $ file ) ) ; } $ this -> setCurrentDir ( $ defaultDirectory ) ; $ this -> import ( $ import [ 'resource' ] , null , isset ( $ import [ 'ignore_errors' ] ) ? ( bool ) $ import [ 'ignore_errors' ] : false , $ file ) ; } }
docstring: Parses all imports.
  
  @param array  $content
  @param string $file
docstring_tokens: Parses all imports .