original_string: public function getPackages()
      {
          $filename = $this->vendorPath . '/composer/installed.json';
          if (!file_exists($filename)) {
              throw new Exception($filename . ' not exists!');
          }
          $packages = [];
          foreach (json_decode(file_get_contents($filename), true) as $package) {
              if ($package['type'] === 'teamelf-extension') {
                  $packages[] = $package;
              }
          }
          return $packages;
      }
code: public function getPackages()
      {
          $filename = $this->vendorPath . '/composer/installed.json';
          if (!file_exists($filename)) {
              throw new Exception($filename . ' not exists!');
          }
          $packages = [];
          foreach (json_decode(file_get_contents($filename), true) as $package) {
              if ($package['type'] === 'teamelf-extension') {
                  $packages[] = $package;
              }
          }
          return $packages;
      }
code_tokens: public function getPackages ( ) { $ filename = $ this -> vendorPath . '/composer/installed.json' ; if ( ! file_exists ( $ filename ) ) { throw new Exception ( $ filename . ' not exists!' ) ; } $ packages = [ ] ; foreach ( json_decode ( file_get_contents ( $ filename ) , true ) as $ package ) { if ( $ package [ 'type' ] === 'teamelf-extension' ) { $ packages [ ] = $ package ; } } return $ packages ; }
docstring: get install packages
  
  @return array
  @throws Exception
docstring_tokens: get install packages