* @psalm-return array{ * version: string, * user: (string|null), * db: (string|null), * bookmark: (string|null), * central_columns: (string|null), * column_info: (string|null), * designer_settings: (string|null), * export_templates: (string|null), * favorite: (string|null), * history: (string|null), * navigationhiding: (string|null), * pdf_pages: (string|null), * recent: (string|null), * relation: (string|null), * savedsearches: (string|null), * table_coords: (string|null), * table_info: (string|null), * table_uiprefs: (string|null), * tracking: (string|null), * userconfig: (string|null), * usergroups: (string|null), * users: (string|null), * bookmarkwork: bool, * mimework: bool, * centralcolumnswork: bool, * commwork: bool, * menuswork: bool, * designersettingswork: bool, * displaywork: bool, * exporttemplateswork: bool, * favoritework: bool, * navwork: bool, * pdfwork: bool, * recentwork: bool, * relwork: bool, * savedsearcheswork: bool, * historywork: bool, * trackingwork: bool, * uiprefswork: bool, * userconfigwork: bool, * allworks: bool * } */ public function toArray(): array { $columnInfo = null; if ($this->columnCommentsFeature !== null) { $columnInfo = $this->columnCommentsFeature->columnInfo->getName(); } elseif ($this->browserTransformationFeature !== null) { $columnInfo = $this->browserTransformationFeature->columnInfo->getName(); } $relation = null; if ($this->relationFeature !== null) { $relation = $this->relationFeature->relation->getName(); } elseif ($this->displayFeature !== null) { $relation = $this->displayFeature->relation->getName(); } return [ 'version' => Version::VERSION, 'user' => $this->user, 'db' => $this->db?->getName(), 'bookmark' => $this->bookmarkFeature?->bookmark->getName(), 'central_columns' => $this->centralColumnsFeature?->centralColumns->getName(), 'column_info' => $columnInfo, 'designer_settings' => $this->databaseDesignerSettingsFeature?->designerSettings->getName(), 'export_templates' => $this->exportTemplatesFeature?->exportTemplates->getName(), 'favorite' => $this->favoriteTablesFeature?->favorite->getName(), 'history' => $this->sqlHistoryFeature?->history->getName(), 'navigationhiding' => $this->navigationItemsHidingFeature?->navigationHiding->getName(), 'pdf_pages' => $this->pdfFeature?->pdfPages->getName(), 'recent' => $this->recentlyUsedTablesFeature?->recent->getName(), 'relation' => $relation, 'savedsearches' => $this->savedQueryByExampleSearchesFeature?->savedSearches->getName(), 'table_coords' => $this->pdfFeature?->tableCoords->getName(), 'table_info' => $this->displayFeature?->tableInfo->getName(), 'table_uiprefs' => $this->uiPreferencesFeature?->tableUiPrefs->getName(), 'tracking' => $this->trackingFeature?->tracking->getName(), 'userconfig' => $this->userPreferencesFeature?->userConfig->getName(), 'usergroups' => $this->configurableMenusFeature?->userGroups->getName(), 'users' => $this->configurableMenusFeature?->users->getName(), 'bookmarkwork' => $this->bookmarkFeature !== null, 'mimework' => $this->browserTransformationFeature !== null, 'centralcolumnswork' => $this->centralColumnsFeature !== null, 'commwork' => $this->columnCommentsFeature !== null, 'menuswork' => $this->configurableMenusFeature !== null, 'designersettingswork' => $this->databaseDesignerSettingsFeature !== null, 'displaywork' => $this->displayFeature !== null, 'exporttemplateswork' => $this->exportTemplatesFeature !== null, 'favoritework' => $this->favoriteTablesFeature !== null, 'navwork' => $this->navigationItemsHidingFeature !== null, 'pdfwork' => $this->pdfFeature !== null, 'recentwork' => $this->recentlyUsedTablesFeature !== null, 'relwork' => $this->relationFeature !== null, 'savedsearcheswork' => $this->savedQueryByExampleSearchesFeature !== null, 'historywork' => $this->sqlHistoryFeature !== null, 'trackingwork' => $this->trackingFeature !== null, 'uiprefswork' => $this->uiPreferencesFeature !== null, 'userconfigwork' => $this->userPreferencesFeature !== null, 'allworks' => $this->hasAllFeatures(), ]; } public function hasAllFeatures(): bool { return $this->bookmarkFeature !== null && $this->browserTransformationFeature !== null && $this->centralColumnsFeature !== null && $this->columnCommentsFeature !== null && $this->configurableMenusFeature !== null && $this->databaseDesignerSettingsFeature !== null && $this->displayFeature !== null && $this->exportTemplatesFeature !== null && $this->favoriteTablesFeature !== null && $this->navigationItemsHidingFeature !== null && $this->pdfFeature !== null && $this->recentlyUsedTablesFeature !== null && $this->relationFeature !== null && $this->savedQueryByExampleSearchesFeature !== null && $this->sqlHistoryFeature !== null && $this->trackingFeature !== null && $this->uiPreferencesFeature !== null && $this->userPreferencesFeature !== null; } }