$checksum) { if (!array_key_exists($path, $expected_checksums)) { $errors[] = 'Extra file: ' . $path; continue; } if ($checksum !== $expected_checksums[$path]) { $errors[] = 'Checksum mismatch: ' . $path; } } foreach ($expected_checksums as $path => $checksum) { if (!self::isIgnored($path) && !array_key_exists($path, $actual_checksums)) { $errors[] = 'Missing file: ' . $path; } } return $errors; } }