diff options
-rw-r--r-- | build/rector.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build/rector.php b/build/rector.php index 9df995a0044..db39fb4ce48 100644 --- a/build/rector.php +++ b/build/rector.php @@ -21,7 +21,21 @@ class NextcloudNamespaceSkipVoter implements ClassNameImportSkipVoterInterface { 'OCA', 'OCP', ]; + private array $skippedClassNames = [ + 'Backend', + 'Connection', + 'Exception', + 'IManager', + 'IProvider', + 'Manager', + 'Plugin', + 'Provider', + ]; public function shouldSkip(File $file, FullyQualifiedObjectType $fullyQualifiedObjectType, Node $node) : bool { + if (in_array($fullyQualifiedObjectType->getShortName(), $this->skippedClassNames)) { + // Skip common class names to avoid confusion + return true; + } foreach ($this->namespacePrefixes as $prefix) { if (str_starts_with($fullyQualifiedObjectType->getClassName(), $prefix . '\\')) { // Import Nextcloud namespaces |