original_string: protected function write(array $record): void
      {
          if (!isset($record['formatted']) || 'string' !== gettype($record['formatted'])) {
              throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string');
          }
  
          $messageBody = $record['formatted'];
          if (strlen($messageBody) >= static::MAX_MESSAGE_SIZE) {
              $messageBody = substr($messageBody, 0, static::HEAD_MESSAGE_SIZE);
          }
  
          $this->client->sendMessage([
              'QueueUrl' => $this->queueUrl,
              'MessageBody' => $messageBody,
          ]);
      }
code: protected function write(array $record): void
      {
          if (!isset($record['formatted']) || 'string' !== gettype($record['formatted'])) {
              throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string');
          }
  
          $messageBody = $record['formatted'];
          if (strlen($messageBody) >= static::MAX_MESSAGE_SIZE) {
              $messageBody = substr($messageBody, 0, static::HEAD_MESSAGE_SIZE);
          }
  
          $this->client->sendMessage([
              'QueueUrl' => $this->queueUrl,
              'MessageBody' => $messageBody,
          ]);
      }
code_tokens: protected function write ( array $ record ) : void { if ( ! isset ( $ record [ 'formatted' ] ) || 'string' !== gettype ( $ record [ 'formatted' ] ) ) { throw new \ InvalidArgumentException ( 'SqsHandler accepts only formatted records as a string' ) ; } $ messageBody = $ record [ 'formatted' ] ; if ( strlen ( $ messageBody ) >= static :: MAX_MESSAGE_SIZE ) { $ messageBody = substr ( $ messageBody , 0 , static :: HEAD_MESSAGE_SIZE ) ; } $ this -> client -> sendMessage ( [ 'QueueUrl' => $ this -> queueUrl , 'MessageBody' => $ messageBody , ] ) ; }
docstring: Writes the record down to the log of the implementing handler.
  
  @param array $record
docstring_tokens: Writes the record down to the log of the implementing handler .