MCPcopy Create free account
hub / github.com/Rello/analytics / canImport

Method canImport

lib/UserMigration/AnalyticsMigrator.php:104–116  ·  view source on GitHub ↗
(IImportSource $importSource)

Source from the content-addressed store, hash-verified

102 }
103
104 public function canImport(IImportSource $importSource): bool {
105 try {
106 $version = $importSource->getMigratorVersion($this->getId());
107 } catch (UserMigrationException) {
108 return false;
109 }
110
111 if ($version === null) {
112 return true;
113 }
114
115 return $version <= self::VERSION;
116 }
117
118 /**
119 * @return list<array<string,mixed>>

Calls 2

getIdMethod · 0.95
getMigratorVersionMethod · 0.80