original_string: public function createMessage($deviceTokens = [])
      {
          $message = new Message();
          if (is_string($deviceTokens)) {
              $deviceTokens = [$deviceTokens];
          }
          if (!is_array($deviceTokens)) {
              throw new InvalidParamException("\$deviceTokens must be string or array");
          }
          foreach ($deviceTokens as $token) {
              $message->addRecipient($this->createDevice($token));
          }
          return $message;
      }
code: public function createMessage($deviceTokens = [])
      {
          $message = new Message();
          if (is_string($deviceTokens)) {
              $deviceTokens = [$deviceTokens];
          }
          if (!is_array($deviceTokens)) {
              throw new InvalidParamException("\$deviceTokens must be string or array");
          }
          foreach ($deviceTokens as $token) {
              $message->addRecipient($this->createDevice($token));
          }
          return $message;
      }
code_tokens: public function createMessage ( $ deviceTokens = [ ] ) { $ message = new Message ( ) ; if ( is_string ( $ deviceTokens ) ) { $ deviceTokens = [ $ deviceTokens ] ; } if ( ! is_array ( $ deviceTokens ) ) { throw new InvalidParamException ( "\$deviceTokens must be string or array" ) ; } foreach ( $ deviceTokens as $ token ) { $ message -> addRecipient ( $ this -> createDevice ( $ token ) ) ; } return $ message ; }
docstring: Creates Message object
  @param string[]|string $deviceTokens tokens of recipient devices
  @return Message
docstring_tokens: Creates Message object