original_string: private function assertValidReturnCode($returnCode, $fromPacket = true)
      {
          if (!in_array($returnCode, [0, 1, 2, 128])) {
              $this->throwException(
                  sprintf('Malformed return code %02x.', $returnCode),
                  $fromPacket
              );
          }
      }
code: private function assertValidReturnCode($returnCode, $fromPacket = true)
      {
          if (!in_array($returnCode, [0, 1, 2, 128])) {
              $this->throwException(
                  sprintf('Malformed return code %02x.', $returnCode),
                  $fromPacket
              );
          }
      }
code_tokens: private function assertValidReturnCode ( $ returnCode , $ fromPacket = true ) { if ( ! in_array ( $ returnCode , [ 0 , 1 , 2 , 128 ] ) ) { $ this -> throwException ( sprintf ( 'Malformed return code %02x.' , $ returnCode ) , $ fromPacket ) ; } }
docstring: Asserts that a return code is valid.
  
  @param int  $returnCode
  @param bool $fromPacket
  
  @throws MalformedPacketException
  @throws \InvalidArgumentException
docstring_tokens: Asserts that a return code is valid .