You are here

public static function CheckResult::combine in Security Review 8

Combines two CheckResults.

Combines two CheckResults and returns a new one with the old one's fields except for the findings which are copied from the fresh result.

Parameters

\Drupal\security_review\CheckResult $old: The old result to clone.

\Drupal\security_review\CheckResult $fresh: The new result to copy the findings from.

Return value

\Drupal\security_review\CheckResult The combined result.

1 call to CheckResult::combine()
Check::lastResult in src/Check.php
Returns the last stored result of the check.

File

src/CheckResult.php, line 104

Class

CheckResult
Used to define the result of a Check.

Namespace

Drupal\security_review

Code

public static function combine(CheckResult $old, CheckResult $fresh) {
  return new CheckResult($old->check, $old->result, $fresh->findings, $old->visible, $old->time);
}