original_string: public function setWill($topic, $message, $qosLevel = 0, $isRetained = false)
      {
          $this->assertValidString($topic, false);
          if ($topic === '') {
              throw new \InvalidArgumentException('The topic must not be empty.');
          }
  
          $this->assertValidStringLength($message, false);
          if ($message === '') {
              throw new \InvalidArgumentException('The message must not be empty.');
          }
  
          $this->assertValidQosLevel($qosLevel, false);
  
          $this->willTopic = $topic;
          $this->willMessage = $message;
  
          $this->flags |= 4;
          $this->flags |= ($qosLevel << 3);
  
          if ($isRetained) {
              $this->flags |= 32;
          } else {
              $this->flags &= ~32;
          }
      }
code: public function setWill($topic, $message, $qosLevel = 0, $isRetained = false)
      {
          $this->assertValidString($topic, false);
          if ($topic === '') {
              throw new \InvalidArgumentException('The topic must not be empty.');
          }
  
          $this->assertValidStringLength($message, false);
          if ($message === '') {
              throw new \InvalidArgumentException('The message must not be empty.');
          }
  
          $this->assertValidQosLevel($qosLevel, false);
  
          $this->willTopic = $topic;
          $this->willMessage = $message;
  
          $this->flags |= 4;
          $this->flags |= ($qosLevel << 3);
  
          if ($isRetained) {
              $this->flags |= 32;
          } else {
              $this->flags &= ~32;
          }
      }
code_tokens: public function setWill ( $ topic , $ message , $ qosLevel = 0 , $ isRetained = false ) { $ this -> assertValidString ( $ topic , false ) ; if ( $ topic === '' ) { throw new \ InvalidArgumentException ( 'The topic must not be empty.' ) ; } $ this -> assertValidStringLength ( $ message , false ) ; if ( $ message === '' ) { throw new \ InvalidArgumentException ( 'The message must not be empty.' ) ; } $ this -> assertValidQosLevel ( $ qosLevel , false ) ; $ this -> willTopic = $ topic ; $ this -> willMessage = $ message ; $ this -> flags |= 4 ; $ this -> flags |= ( $ qosLevel << 3 ) ; if ( $ isRetained ) { $ this -> flags |= 32 ; } else { $ this -> flags &= ~ 32 ; } }
docstring: Sets the will.
  
  @param string $topic
  @param string $message
  @param int    $qosLevel
  @param bool   $isRetained
  
  @throws \InvalidArgumentException
docstring_tokens: Sets the will .