original_string: public function getConversions($unit)
      {
          if (!isset($this->units[$unit]['base'])) {
              throw new OutOfBoundsException('Unit is not set');
          }
  
          $units = array();
  
          foreach ($this->units as $key => $value) {
              if (isset($value['base']) && $value['base'] === $this->units[$unit]['base']) {
                  array_push($units, $key);
              }
          }
  
          return $units;
      }
code: public function getConversions($unit)
      {
          if (!isset($this->units[$unit]['base'])) {
              throw new OutOfBoundsException('Unit is not set');
          }
  
          $units = array();
  
          foreach ($this->units as $key => $value) {
              if (isset($value['base']) && $value['base'] === $this->units[$unit]['base']) {
                  array_push($units, $key);
              }
          }
  
          return $units;
      }
code_tokens: public function getConversions ( $ unit ) { if ( ! isset ( $ this -> units [ $ unit ] [ 'base' ] ) ) { throw new OutOfBoundsException ( 'Unit is not set' ) ; } $ units = array ( ) ; foreach ( $ this -> units as $ key => $ value ) { if ( isset ( $ value [ 'base' ] ) && $ value [ 'base' ] === $ this -> units [ $ unit ] [ 'base' ] ) { array_push ( $ units , $ key ) ; } } return $ units ; }
docstring: List all available conversion units for given unit
  @param string $unit
  @return array
  @throws OutOfBoundsException
docstring_tokens: List all available conversion units for given unit