original_string: public function handle(UpdateComponentCommand $command)
      {
          $component = $command->component;
          $originalStatus = $component->status;
  
          if ($command->status && (int) $originalStatus !== (int) $command->status) {
              event(new ComponentStatusWasChangedEvent($this->auth->user(), $component, $originalStatus, $command->status, $command->silent));
          }
  
          $component->update($this->filter($command));
  
          event(new ComponentWasUpdatedEvent($this->auth->user(), $component));
  
          return $component;
      }
code: public function handle(UpdateComponentCommand $command)
      {
          $component = $command->component;
          $originalStatus = $component->status;
  
          if ($command->status && (int) $originalStatus !== (int) $command->status) {
              event(new ComponentStatusWasChangedEvent($this->auth->user(), $component, $originalStatus, $command->status, $command->silent));
          }
  
          $component->update($this->filter($command));
  
          event(new ComponentWasUpdatedEvent($this->auth->user(), $component));
  
          return $component;
      }
code_tokens: public function handle ( UpdateComponentCommand $ command ) { $ component = $ command -> component ; $ originalStatus = $ component -> status ; if ( $ command -> status && ( int ) $ originalStatus !== ( int ) $ command -> status ) { event ( new ComponentStatusWasChangedEvent ( $ this -> auth -> user ( ) , $ component , $ originalStatus , $ command -> status , $ command -> silent ) ) ; } $ component -> update ( $ this -> filter ( $ command ) ) ; event ( new ComponentWasUpdatedEvent ( $ this -> auth -> user ( ) , $ component ) ) ; return $ component ; }
docstring: Handle the update component command.
  
  @param \CachetHQ\Cachet\Bus\Commands\Component\UpdateComponentCommand $command
  
  @return \CachetHQ\Cachet\Models\Component
docstring_tokens: Handle the update component command .