original_string: public function update(Metric $metric)
      {
          try {
              $metric = execute(new UpdateMetricCommand(
                  $metric,
                  Binput::get('name'),
                  Binput::get('suffix'),
                  Binput::get('description'),
                  Binput::get('default_value'),
                  Binput::get('calc_type'),
                  Binput::get('display_chart'),
                  Binput::get('places'),
                  Binput::get('default_view', Binput::get('view')),
                  Binput::get('threshold'),
                  Binput::get('order'),
                  Binput::get('visible')
              ));
          } catch (QueryException $e) {
              throw new BadRequestHttpException();
          }
  
          return $this->item($metric);
      }
code: public function update(Metric $metric)
      {
          try {
              $metric = execute(new UpdateMetricCommand(
                  $metric,
                  Binput::get('name'),
                  Binput::get('suffix'),
                  Binput::get('description'),
                  Binput::get('default_value'),
                  Binput::get('calc_type'),
                  Binput::get('display_chart'),
                  Binput::get('places'),
                  Binput::get('default_view', Binput::get('view')),
                  Binput::get('threshold'),
                  Binput::get('order'),
                  Binput::get('visible')
              ));
          } catch (QueryException $e) {
              throw new BadRequestHttpException();
          }
  
          return $this->item($metric);
      }
code_tokens: public function update ( Metric $ metric ) { try { $ metric = execute ( new UpdateMetricCommand ( $ metric , Binput :: get ( 'name' ) , Binput :: get ( 'suffix' ) , Binput :: get ( 'description' ) , Binput :: get ( 'default_value' ) , Binput :: get ( 'calc_type' ) , Binput :: get ( 'display_chart' ) , Binput :: get ( 'places' ) , Binput :: get ( 'default_view' , Binput :: get ( 'view' ) ) , Binput :: get ( 'threshold' ) , Binput :: get ( 'order' ) , Binput :: get ( 'visible' ) ) ) ; } catch ( QueryException $ e ) { throw new BadRequestHttpException ( ) ; } return $ this -> item ( $ metric ) ; }
docstring: Update an existing metric.
  
  @param \CachetHQ\Cachet\Models\Metric $metric
  
  @return \Illuminate\Http\JsonResponse
docstring_tokens: Update an existing metric .