original_string: public function update(array $data, $line)
      {
          if( is_integer($line) )
          {
              $line = array('Id' => $line);
          }
  
          foreach( $data as $name => $value )
          {
              if( is_null($value) )
                  continue;
  
              switch( strtolower($name) )
              {
                  case 'description':
                      $this->description($line, $value);
                      break;
                  case 'price':
                      $this->price($line, $value);
                      break;
                  case 'discount':
                      $this->discount($line, $value);
                      break;
                  case 'qty':
                      $this->qty($line, $value);
                      break;
                  case 'unit':
                      $this->unit($line, $value);
                      break;
              }
          }
  
          return $this->getArrayFromHandles( array('CurrentInvoiceLineHandle'=>$line) );
      }
code: public function update(array $data, $line)
      {
          if( is_integer($line) )
          {
              $line = array('Id' => $line);
          }
  
          foreach( $data as $name => $value )
          {
              if( is_null($value) )
                  continue;
  
              switch( strtolower($name) )
              {
                  case 'description':
                      $this->description($line, $value);
                      break;
                  case 'price':
                      $this->price($line, $value);
                      break;
                  case 'discount':
                      $this->discount($line, $value);
                      break;
                  case 'qty':
                      $this->qty($line, $value);
                      break;
                  case 'unit':
                      $this->unit($line, $value);
                      break;
              }
          }
  
          return $this->getArrayFromHandles( array('CurrentInvoiceLineHandle'=>$line) );
      }
code_tokens: public function update ( array $ data , $ line ) { if ( is_integer ( $ line ) ) { $ line = array ( 'Id' => $ line ) ; } foreach ( $ data as $ name => $ value ) { if ( is_null ( $ value ) ) continue ; switch ( strtolower ( $ name ) ) { case 'description' : $ this -> description ( $ line , $ value ) ; break ; case 'price' : $ this -> price ( $ line , $ value ) ; break ; case 'discount' : $ this -> discount ( $ line , $ value ) ; break ; case 'qty' : $ this -> qty ( $ line , $ value ) ; break ; case 'unit' : $ this -> unit ( $ line , $ value ) ; break ; } } return $ this -> getArrayFromHandles ( array ( 'CurrentInvoiceLineHandle' => $ line ) ) ; }
docstring: Update Invoice Line with data
  @param  array  $data
  @param  object $line
  @return object
docstring_tokens: Update Invoice Line with data