original_string: protected function importPackage($file)
      {
          $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
  
          if ($extension === Packager::FILE_EXTENSION) {
              $this->importOldPackage($file);
          } else {
              $package = new Package($file, $this->option('delete'), $this->option('password'));
              $importer = new Importer($package);
              $importer->import();
              $log = $importer->getLog();
              $this->importLog[] = [
                  'file' => $file,
                  'log'  => $log
              ];
          }
      }
code: protected function importPackage($file)
      {
          $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
  
          if ($extension === Packager::FILE_EXTENSION) {
              $this->importOldPackage($file);
          } else {
              $package = new Package($file, $this->option('delete'), $this->option('password'));
              $importer = new Importer($package);
              $importer->import();
              $log = $importer->getLog();
              $this->importLog[] = [
                  'file' => $file,
                  'log'  => $log
              ];
          }
      }
code_tokens: protected function importPackage ( $ file ) { $ extension = strtolower ( pathinfo ( $ file , PATHINFO_EXTENSION ) ) ; if ( $ extension === Packager :: FILE_EXTENSION ) { $ this -> importOldPackage ( $ file ) ; } else { $ package = new Package ( $ file , $ this -> option ( 'delete' ) , $ this -> option ( 'password' ) ) ; $ importer = new Importer ( $ package ) ; $ importer -> import ( ) ; $ log = $ importer -> getLog ( ) ; $ this -> importLog [ ] = [ 'file' => $ file , 'log' => $ log ] ; } }
docstring: Imports package.
  
  @param $file
  
  @throws \Exception
docstring_tokens: Imports package .