original_string: public function toAll($decimals = null, $round = true)
      {
          if (!isset($this->value)) {
              throw new InvalidArgumentException('From value not set');
          }
  
          if (empty($this->base_unit)) {
              throw new InvalidArgumentException('No from unit set');
          }
  
          $units = array();
  
          foreach ($this->units as $key => $data) {
              if ($data['base'] == $this->base_unit) {
                  array_push($units, $key);
              }
          }
  
          return $this->toMany($units, $decimals, $round);
      }
code: public function toAll($decimals = null, $round = true)
      {
          if (!isset($this->value)) {
              throw new InvalidArgumentException('From value not set');
          }
  
          if (empty($this->base_unit)) {
              throw new InvalidArgumentException('No from unit set');
          }
  
          $units = array();
  
          foreach ($this->units as $key => $data) {
              if ($data['base'] == $this->base_unit) {
                  array_push($units, $key);
              }
          }
  
          return $this->toMany($units, $decimals, $round);
      }
code_tokens: public function toAll ( $ decimals = null , $ round = true ) { if ( ! isset ( $ this -> value ) ) { throw new InvalidArgumentException ( 'From value not set' ) ; } if ( empty ( $ this -> base_unit ) ) { throw new InvalidArgumentException ( 'No from unit set' ) ; } $ units = array ( ) ; foreach ( $ this -> units as $ key => $ data ) { if ( $ data [ 'base' ] == $ this -> base_unit ) { array_push ( $ units , $ key ) ; } } return $ this -> toMany ( $ units , $ decimals , $ round ) ; }
docstring: Convert from value to all compatible units
  @param number $decimals
  @param bool $round
  @return array
  @throws InvalidArgumentException
docstring_tokens: Convert from value to all compatible units