public function remediate()
  {
    $response = new AuditResponse($this->getPolicy());
    try {

      // Do not attempt remediation on checks that don't support it.
      if (!($this->getAuditor() instanceof RemediableInterface)) {
        throw new \Exception(get_class($this->getAuditor()) . ' is not remediable.');
      }

      // Make sure remediation does report false positives due to caching.
      Cache::purge();
      $outcome = $this->getAuditor()->remediate($this);
      $response->set($outcome, $this->getParameterTokens());
    }
    catch (\Exception $e) {
      $this->setParameter('exception', $e->getMessage());
      $response->set(Audit::ERROR, $this->getParameterTokens());
    }
    $this->getAssessment()->setPolicyResult($response);
    return $response;
  }
public function remediate()
  {
    $response = new AuditResponse($this->getPolicy());
    try {

      // Do not attempt remediation on checks that don't support it.
      if (!($this->getAuditor() instanceof RemediableInterface)) {
        throw new \Exception(get_class($this->getAuditor()) . ' is not remediable.');
      }

      // Make sure remediation does report false positives due to caching.
      Cache::purge();
      $outcome = $this->getAuditor()->remediate($this);
      $response->set($outcome, $this->getParameterTokens());
    }
    catch (\Exception $e) {
      $this->setParameter('exception', $e->getMessage());
      $response->set(Audit::ERROR, $this->getParameterTokens());
    }
    $this->getAssessment()->setPolicyResult($response);
    return $response;
  }
public function remediate ( ) { $ response = new AuditResponse ( $ this -> getPolicy ( ) ) ; try { // Do not attempt remediation on checks that don't support it. if ( ! ( $ this -> getAuditor ( ) instanceof RemediableInterface ) ) { throw new \ Exception ( get_class ( $ this -> getAuditor ( ) ) . ' is not remediable.' ) ; } // Make sure remediation does report false positives due to caching. Cache :: purge ( ) ; $ outcome = $ this -> getAuditor ( ) -> remediate ( $ this ) ; $ response -> set ( $ outcome , $ this -> getParameterTokens ( ) ) ; } catch ( \ Exception $ e ) { $ this -> setParameter ( 'exception' , $ e -> getMessage ( ) ) ; $ response -> set ( Audit :: ERROR , $ this -> getParameterTokens ( ) ) ; } $ this -> getAssessment ( ) -> setPolicyResult ( $ response ) ; return $ response ; }
Remediate the check if available.
Remediate the check if available .