original_string: public function sendFailed()
      {
          $messages = Message::findAll(['status' => Message::STATUS_ERROR]);
          foreach ($messages as $message) {
              try {
                  $message->status = $this->send($message) > 0 ? Message::STATUS_SUCCESS : Message::STATUS_ERROR;
                  $message->save(true, ['status']);
              } catch (\Exception $e) {
                  $message->status = Message::STATUS_FATAL_ERROR;
                  $message->save(true, ['status']);
                  $this->stderr($e->getMessage());
              }
          }
      }
code: public function sendFailed()
      {
          $messages = Message::findAll(['status' => Message::STATUS_ERROR]);
          foreach ($messages as $message) {
              try {
                  $message->status = $this->send($message) > 0 ? Message::STATUS_SUCCESS : Message::STATUS_ERROR;
                  $message->save(true, ['status']);
              } catch (\Exception $e) {
                  $message->status = Message::STATUS_FATAL_ERROR;
                  $message->save(true, ['status']);
                  $this->stderr($e->getMessage());
              }
          }
      }
code_tokens: public function sendFailed ( ) { $ messages = Message :: findAll ( [ 'status' => Message :: STATUS_ERROR ] ) ; foreach ( $ messages as $ message ) { try { $ message -> status = $ this -> send ( $ message ) > 0 ? Message :: STATUS_SUCCESS : Message :: STATUS_ERROR ; $ message -> save ( true , [ 'status' ] ) ; } catch ( \ Exception $ e ) { $ message -> status = Message :: STATUS_FATAL_ERROR ; $ message -> save ( true , [ 'status' ] ) ; $ this -> stderr ( $ e -> getMessage ( ) ) ; } } }
docstring: Send failed messages
docstring_tokens: Send failed messages