original_string: private function parse_unixsocket_response($output) {
          $splitoutput = explode(': ', $output);
          $message = trim($splitoutput[1]);
          if ($message === 'OK') {
              return self::SCAN_RESULT_OK;
          } else {
              $parts = explode(' ', $message);
              $status = array_pop($parts);
              if ($status === 'FOUND') {
                  return self::SCAN_RESULT_FOUND;
              } else {
                  $notice = get_string('clamfailed', 'antivirus_clamav', $this->get_clam_error_code(2));
                  $notice .= "\n\n" . $output;
                  $this->set_scanning_notice($notice);
                  return self::SCAN_RESULT_ERROR;
              }
          }
      }
code: private function parse_unixsocket_response($output) {
          $splitoutput = explode(': ', $output);
          $message = trim($splitoutput[1]);
          if ($message === 'OK') {
              return self::SCAN_RESULT_OK;
          } else {
              $parts = explode(' ', $message);
              $status = array_pop($parts);
              if ($status === 'FOUND') {
                  return self::SCAN_RESULT_FOUND;
              } else {
                  $notice = get_string('clamfailed', 'antivirus_clamav', $this->get_clam_error_code(2));
                  $notice .= "\n\n" . $output;
                  $this->set_scanning_notice($notice);
                  return self::SCAN_RESULT_ERROR;
              }
          }
      }
code_tokens: private function parse_unixsocket_response ( $ output ) { $ splitoutput = explode ( ': ' , $ output ) ; $ message = trim ( $ splitoutput [ 1 ] ) ; if ( $ message === 'OK' ) { return self :: SCAN_RESULT_OK ; } else { $ parts = explode ( ' ' , $ message ) ; $ status = array_pop ( $ parts ) ; if ( $ status === 'FOUND' ) { return self :: SCAN_RESULT_FOUND ; } else { $ notice = get_string ( 'clamfailed' , 'antivirus_clamav' , $ this -> get_clam_error_code ( 2 ) ) ; $ notice .= "\n\n" . $ output ; $ this -> set_scanning_notice ( $ notice ) ; return self :: SCAN_RESULT_ERROR ; } } }
docstring: Parse unix socket command response.
  
  @param string $output The unix socket command response.
  @return int Scanning result constant.
docstring_tokens: Parse unix socket command response .