public function AuditResult::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/src/Audit/AuditResult.php \Drupal\migrate\Audit\AuditResult::__construct()
- 9 core/modules/migrate/src/Audit/AuditResult.php \Drupal\migrate\Audit\AuditResult::__construct()
AuditResult constructor.
Parameters
\Drupal\migrate\Plugin\MigrationInterface $migration: The audited migration.
bool $status: The result of the audit (TRUE if passed, FALSE otherwise).
string[] $reasons: (optional) The reasons why the migration passed or failed the audit.
File
- core/
modules/ migrate/ src/ Audit/ AuditResult.php, line 44
Class
- AuditResult
- Encapsulates the result of a migration audit.
Namespace
Drupal\migrate\AuditCode
public function __construct(MigrationInterface $migration, $status, array $reasons = []) {
if (!is_bool($status)) {
throw new \InvalidArgumentException('Audit results must have a boolean status.');
}
$this->migration = $migration;
$this->status = $status;
array_walk($reasons, [
$this,
'addReason',
]);
}