public function setPolicyResult(AuditResponse $response)
  {
    $this->results[$response->getPolicy()->get('name')] = $response;

    // Set the overall success state of the Assessment. Considered
    // a success if all policies pass.
    $this->successful = $this->successful && $response->isSuccessful();

    // If the policy failed its assessment and the severity of the Policy
    // is higher than the current severity of the assessment, then increase
    // the severity of the overall assessment.
    $severity = $response->getPolicy()->getSeverity();
    if (!$response->isSuccessful() && ($this->severity < $severity)) {
      $this->setSeverity($severity);
    }
  }
public function setPolicyResult(AuditResponse $response)
  {
    $this->results[$response->getPolicy()->get('name')] = $response;

    // Set the overall success state of the Assessment. Considered
    // a success if all policies pass.
    $this->successful = $this->successful && $response->isSuccessful();

    // If the policy failed its assessment and the severity of the Policy
    // is higher than the current severity of the assessment, then increase
    // the severity of the overall assessment.
    $severity = $response->getPolicy()->getSeverity();
    if (!$response->isSuccessful() && ($this->severity < $severity)) {
      $this->setSeverity($severity);
    }
  }
public function setPolicyResult ( AuditResponse $ response ) { $ this -> results [ $ response -> getPolicy ( ) -> get ( 'name' ) ] = $ response ; // Set the overall success state of the Assessment. Considered // a success if all policies pass. $ this -> successful = $ this -> successful && $ response -> isSuccessful ( ) ; // If the policy failed its assessment and the severity of the Policy // is higher than the current severity of the assessment, then increase // the severity of the overall assessment. $ severity = $ response -> getPolicy ( ) -> getSeverity ( ) ; if ( ! $ response -> isSuccessful ( ) && ( $ this -> severity < $ severity ) ) { $ this -> setSeverity ( $ severity ) ; } }
Set the result of a Policy.

The result of a Policy is unique to an assessment result set.

@param AuditResponse $response
Set the result of a Policy .