<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
  <file src="lib/Controller/ApiController.php">
    <DeprecatedMethod>
      <code><![CDATA[setAppValue]]></code>
      <code><![CDATA[setAppValue]]></code>
      <code><![CDATA[setAppValue]]></code>
      <code><![CDATA[setAppValue]]></code>
    </DeprecatedMethod>
    <InvalidArrayOffset>
      <code><![CDATA[$result['coordinates_3d']]]></code>
      <code><![CDATA[$result['pca_variance']]]></code>
      <code><![CDATA[$result['query_coords']]]></code>
      <code><![CDATA[$webhook['eventFilter']]]></code>
    </InvalidArrayOffset>
    <MissingClosureReturnType>
      <code><![CDATA[function (string $refreshToken) {]]></code>
      <code><![CDATA[function (string $refreshToken) {]]></code>
      <code><![CDATA[function (string $refreshToken) {]]></code>
      <code><![CDATA[function (string $refreshToken) {]]></code>
      <code><![CDATA[function (string $refreshToken) {]]></code>
    </MissingClosureReturnType>
    <MixedArgument>
      <code><![CDATA[!empty($eventConfig['filter']) ? $eventConfig['filter'] : null]]></code>
      <code><![CDATA[$accessToken]]></code>
      <code><![CDATA[$algorithm]]></code>
      <code><![CDATA[$eventConfig['event']]]></code>
      <code><![CDATA[$fusion]]></code>
    </MixedArgument>
    <MixedArrayAccess>
      <code><![CDATA[$data['algorithm']]]></code>
      <code><![CDATA[$data['fusion']]]></code>
      <code><![CDATA[$data['limit']]]></code>
      <code><![CDATA[$data['scoreThreshold']]]></code>
      <code><![CDATA[$eventConfig['event']]]></code>
      <code><![CDATA[$eventConfig['event']]]></code>
      <code><![CDATA[$eventConfig['filter']]]></code>
      <code><![CDATA[$presetEvent['event']]]></code>
      <code><![CDATA[$presetEvent['event']]]></code>
      <code><![CDATA[$presetEvent['filter']]]></code>
      <code><![CDATA[$presetEvent['filter']]]></code>
    </MixedArrayAccess>
    <MixedAssignment>
      <code><![CDATA[$accessToken]]></code>
      <code><![CDATA[$algorithm]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$eventConfig]]></code>
      <code><![CDATA[$fusion]]></code>
      <code><![CDATA[$presetEvent]]></code>
      <code><![CDATA[$presetEvent]]></code>
      <code><![CDATA[$presetFilter]]></code>
      <code><![CDATA[$presetFilter]]></code>
      <code><![CDATA[$response['coordinates_3d']]]></code>
      <code><![CDATA[$response['pca_variance']]]></code>
      <code><![CDATA[$response['query_coords']]]></code>
      <code><![CDATA[$webhookFilter]]></code>
    </MixedAssignment>
    <PossiblyUndefinedArrayOffset>
      <code><![CDATA[$webhook['event']]]></code>
      <code><![CDATA[$webhook['event']]]></code>
      <code><![CDATA[$webhook['event']]]></code>
      <code><![CDATA[$webhook['id']]]></code>
    </PossiblyUndefinedArrayOffset>
    <RiskyTruthyFalsyComparison>
      <code><![CDATA[!$accessToken]]></code>
      <code><![CDATA[!$accessToken]]></code>
      <code><![CDATA[!$accessToken]]></code>
      <code><![CDATA[!$accessToken]]></code>
      <code><![CDATA[!$accessToken]]></code>
      <code><![CDATA[!$newTokenData]]></code>
      <code><![CDATA[!$newTokenData]]></code>
      <code><![CDATA[!$newTokenData]]></code>
      <code><![CDATA[!$newTokenData]]></code>
      <code><![CDATA[!$newTokenData]]></code>
      <code><![CDATA[!$token]]></code>
      <code><![CDATA[empty($webhook['eventFilter'])]]></code>
    </RiskyTruthyFalsyComparison>
    <TypeDoesNotContainType>
      <code><![CDATA[is_array($status)]]></code>
      <code><![CDATA[is_array($status)]]></code>
    </TypeDoesNotContainType>
    <UnusedClass>
      <code><![CDATA[ApiController]]></code>
    </UnusedClass>
  </file>
  <file src="lib/Controller/CredentialsController.php">
    <MixedArgument>
      <code><![CDATA[$mcpServerUrl]]></code>
    </MixedArgument>
    <MixedArrayAccess>
      <code><![CDATA[$body['error']]]></code>
      <code><![CDATA[$body['success']]]></code>
    </MixedArrayAccess>
    <MixedAssignment>
      <code><![CDATA[$body]]></code>
      <code><![CDATA[$error]]></code>
      <code><![CDATA[$mcpServerUrl]]></code>
    </MixedAssignment>
    <PossiblyInvalidArgument>
      <code><![CDATA[$response->getBody()]]></code>
    </PossiblyInvalidArgument>
    <RiskyTruthyFalsyComparison>
      <code><![CDATA[$body['success'] ?? false]]></code>
    </RiskyTruthyFalsyComparison>
    <UnusedClass>
      <code><![CDATA[CredentialsController]]></code>
    </UnusedClass>
  </file>
  <file src="lib/Controller/OAuthController.php">
    <MixedArgument>
      <code><![CDATA[$authEndpoint]]></code>
      <code><![CDATA[$codeVerifier]]></code>
      <code><![CDATA[$discoveryUrl]]></code>
      <code><![CDATA[$discoveryUrl]]></code>
      <code><![CDATA[$internalBaseUrl]]></code>
      <code><![CDATA[$mcpServerUrl]]></code>
      <code><![CDATA[$mcpServerUrl]]></code>
      <code><![CDATA[$tokenData['access_token']]]></code>
      <code><![CDATA[$tokenData['refresh_token'] ?? '']]></code>
      <code><![CDATA[$tokenEndpoint]]></code>
      <code><![CDATA[$userId]]></code>
      <code><![CDATA[time() + ($tokenData['expires_in'] ?? 3600)]]></code>
    </MixedArgument>
    <MixedArrayAccess>
      <code><![CDATA[$discovery['authorization_endpoint']]]></code>
      <code><![CDATA[$discovery['token_endpoint']]]></code>
      <code><![CDATA[$discovery['token_endpoint']]]></code>
      <code><![CDATA[$statusData['auth_mode']]]></code>
      <code><![CDATA[$statusData['oidc']]]></code>
      <code><![CDATA[$statusData['oidc']]]></code>
      <code><![CDATA[$statusData['oidc']]]></code>
      <code><![CDATA[$statusData['oidc']['discovery_url']]]></code>
      <code><![CDATA[$statusData['oidc']['discovery_url']]]></code>
      <code><![CDATA[$statusData['oidc']['discovery_url']]]></code>
    </MixedArrayAccess>
    <MixedAssignment>
      <code><![CDATA[$authEndpoint]]></code>
      <code><![CDATA[$clientSecret]]></code>
      <code><![CDATA[$clientSecret]]></code>
      <code><![CDATA[$codeVerifier]]></code>
      <code><![CDATA[$discovery]]></code>
      <code><![CDATA[$discovery]]></code>
      <code><![CDATA[$discoveryUrl]]></code>
      <code><![CDATA[$discoveryUrl]]></code>
      <code><![CDATA[$mcpServerPublicUrl]]></code>
      <code><![CDATA[$mcpServerUrl]]></code>
      <code><![CDATA[$mcpServerUrl]]></code>
      <code><![CDATA[$postData['client_secret']]]></code>
      <code><![CDATA[$statusData]]></code>
      <code><![CDATA[$statusData]]></code>
      <code><![CDATA[$storedState]]></code>
      <code><![CDATA[$tokenData]]></code>
      <code><![CDATA[$tokenEndpoint]]></code>
      <code><![CDATA[$userId]]></code>
    </MixedAssignment>
    <MixedInferredReturnType>
      <code><![CDATA[array]]></code>
    </MixedInferredReturnType>
    <MixedOperand>
      <code><![CDATA[$authEndpoint]]></code>
      <code><![CDATA[$tokenData['expires_in'] ?? 3600]]></code>
    </MixedOperand>
    <MixedReturnStatement>
      <code><![CDATA[$tokenData]]></code>
    </MixedReturnStatement>
    <PossiblyInvalidArgument>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$responseBody]]></code>
      <code><![CDATA[$responseBody]]></code>
      <code><![CDATA[$statusResponse->getBody()]]></code>
      <code><![CDATA[$statusResponse->getBody()]]></code>
    </PossiblyInvalidArgument>
    <RiskyTruthyFalsyComparison>
      <code><![CDATA[$error]]></code>
    </RiskyTruthyFalsyComparison>
    <UnusedClass>
      <code><![CDATA[OAuthController]]></code>
    </UnusedClass>
  </file>
  <file src="lib/Listener/AstrolabeAdminSettingsListener.php">
    <MixedAssignment>
      <code><![CDATA[$value]]></code>
      <code><![CDATA[$value]]></code>
    </MixedAssignment>
    <PossiblyUnusedMethod>
      <code><![CDATA[__construct]]></code>
    </PossiblyUnusedMethod>
    <RedundantCondition>
      <code><![CDATA[$event instanceof DeclarativeSettingsSetValueEvent]]></code>
    </RedundantCondition>
  </file>
  <file src="lib/Search/SemanticSearchProvider.php">
    <DeprecatedMethod>
      <code><![CDATA[getAppValue]]></code>
      <code><![CDATA[getAppValue]]></code>
      <code><![CDATA[getAppValue]]></code>
      <code><![CDATA[getAppValue]]></code>
    </DeprecatedMethod>
    <MixedArgument>
      <code><![CDATA[$chunkNum]]></code>
      <code><![CDATA[$docType]]></code>
      <code><![CDATA[$mimeType]]></code>
      <code><![CDATA[$result['page_count']]]></code>
      <code><![CDATA[$result['page_number']]]></code>
      <code><![CDATA[$result['total_chunks']]]></code>
      <code><![CDATA[$title]]></code>
    </MixedArgument>
    <MixedAssignment>
      <code><![CDATA[$chunkEnd]]></code>
      <code><![CDATA[$chunkNum]]></code>
      <code><![CDATA[$chunkStart]]></code>
      <code><![CDATA[$docType]]></code>
      <code><![CDATA[$docType]]></code>
      <code><![CDATA[$id]]></code>
      <code><![CDATA[$mimeType]]></code>
      <code><![CDATA[$params['board_id']]]></code>
      <code><![CDATA[$params['page_number']]]></code>
      <code><![CDATA[$params['path']]]></code>
      <code><![CDATA[$params['title']]]></code>
      <code><![CDATA[$score]]></code>
      <code><![CDATA[$title]]></code>
    </MixedAssignment>
    <MixedOperand>
      <code><![CDATA[$result['chunk_index']]]></code>
      <code><![CDATA[$score]]></code>
    </MixedOperand>
    <PossiblyUnusedMethod>
      <code><![CDATA[__construct]]></code>
    </PossiblyUnusedMethod>
    <RiskyTruthyFalsyComparison>
      <code><![CDATA[$cursor]]></code>
      <code><![CDATA[empty($results['error'])]]></code>
      <code><![CDATA[empty($status['error'])]]></code>
    </RiskyTruthyFalsyComparison>
  </file>
  <file src="lib/Service/IdpTokenRefresher.php">
    <MixedArgument>
      <code><![CDATA[$discoveryUrl]]></code>
      <code><![CDATA[$tokenData]]></code>
      <code><![CDATA[$tokenEndpoint]]></code>
    </MixedArgument>
    <MixedArrayAccess>
      <code><![CDATA[$discovery['token_endpoint']]]></code>
      <code><![CDATA[$statusData['oidc']]]></code>
      <code><![CDATA[$statusData['oidc']['discovery_url']]]></code>
    </MixedArrayAccess>
    <MixedAssignment>
      <code><![CDATA[$clientSecret]]></code>
      <code><![CDATA[$discovery]]></code>
      <code><![CDATA[$discoveryUrl]]></code>
      <code><![CDATA[$internalUrl]]></code>
      <code><![CDATA[$mcpServerUrl]]></code>
      <code><![CDATA[$statusData]]></code>
      <code><![CDATA[$tokenData]]></code>
      <code><![CDATA[$tokenEndpoint]]></code>
    </MixedAssignment>
    <MixedInferredReturnType>
      <code><![CDATA[array|null]]></code>
    </MixedInferredReturnType>
    <MixedOperand>
      <code><![CDATA[$mcpServerUrl]]></code>
    </MixedOperand>
    <MixedReturnStatement>
      <code><![CDATA[$tokenData]]></code>
    </MixedReturnStatement>
    <PossiblyInvalidArgument>
      <code><![CDATA[$discoveryResponse->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$statusResponse->getBody()]]></code>
    </PossiblyInvalidArgument>
    <PossiblyUnusedMethod>
      <code><![CDATA[__construct]]></code>
    </PossiblyUnusedMethod>
  </file>
  <file src="lib/Service/McpServerClient.php">
    <MixedArgument>
      <code><![CDATA[$clientId]]></code>
    </MixedArgument>
    <MixedAssignment>
      <code><![CDATA[$baseUrl]]></code>
      <code><![CDATA[$clientId]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
    </MixedAssignment>
    <MixedInferredReturnType>
      <code><![CDATA[array]]></code>
      <code><![CDATA[array{
	 *   apps?: array<string>,
	 *   error?: string
	 * }]]></code>
      <code><![CDATA[array{
	 *   id?: int,
	 *   event?: string,
	 *   uri?: string,
	 *   event_filter?: array,
	 *   enabled?: bool,
	 *   error?: string
	 * }]]></code>
      <code><![CDATA[array{
	 *   results?: array,
	 *   pca_coordinates?: array,
	 *   algorithm_used?: string,
	 *   total_documents?: int,
	 *   error?: string
	 * }]]></code>
      <code><![CDATA[array{
	 *   results?: array<array{
	 *     id?: string|int,
	 *     title?: string,
	 *     doc_type?: string,
	 *     excerpt?: string,
	 *     score?: float,
	 *     path?: string,
	 *     board_id?: int,
	 *     card_id?: int
	 *   }>,
	 *   total_found?: int,
	 *   algorithm_used?: string,
	 *   error?: string
	 * }]]></code>
      <code><![CDATA[array{
	 *   session_id?: string,
	 *   background_access_granted?: bool,
	 *   background_access_details?: array,
	 *   idp_profile?: array,
	 *   error?: string
	 * }]]></code>
      <code><![CDATA[array{
	 *   status?: string,
	 *   indexed_documents?: int,
	 *   pending_documents?: int,
	 *   last_sync_time?: string,
	 *   documents_per_second?: float,
	 *   errors_24h?: int,
	 *   error?: string
	 * }]]></code>
      <code><![CDATA[array{
	 *   version?: string,
	 *   auth_mode?: string,
	 *   vector_sync_enabled?: bool,
	 *   uptime_seconds?: int,
	 *   management_api_version?: string,
	 *   error?: string
	 * }]]></code>
      <code><![CDATA[array{
	 *   webhooks?: array<array{
	 *     id?: int,
	 *     event?: string,
	 *     uri?: string,
	 *     event_filter?: array,
	 *     enabled?: bool
	 *   }>,
	 *   error?: string
	 * }]]></code>
      <code><![CDATA[array{success?: bool, error?: string}]]></code>
      <code><![CDATA[array{success?: bool, message?: string, error?: string}]]></code>
      <code><![CDATA[string]]></code>
    </MixedInferredReturnType>
    <MixedReturnStatement>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$data]]></code>
      <code><![CDATA[$this->config->getSystemValue('mcp_server_public_url', $this->baseUrl)]]></code>
    </MixedReturnStatement>
    <PossiblyInvalidArgument>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
      <code><![CDATA[$response->getBody()]]></code>
    </PossiblyInvalidArgument>
    <PossiblyUnusedMethod>
      <code><![CDATA[__construct]]></code>
      <code><![CDATA[isServerReachable]]></code>
    </PossiblyUnusedMethod>
  </file>
  <file src="lib/Service/McpTokenStorage.php">
    <InvalidReturnStatement>
      <code><![CDATA[$tokenData]]></code>
    </InvalidReturnStatement>
    <InvalidReturnType>
      <code><![CDATA[array|null]]></code>
    </InvalidReturnType>
    <MixedArgument>
      <code><![CDATA[$newTokenData['access_token']]]></code>
      <code><![CDATA[$newTokenData['refresh_token'] ?? $token['refresh_token']]]></code>
      <code><![CDATA[time() + ($newTokenData['expires_in'] ?? 3600)]]></code>
    </MixedArgument>
    <MixedAssignment>
      <code><![CDATA[$newTokenData]]></code>
    </MixedAssignment>
    <MixedInferredReturnType>
      <code><![CDATA[string|null]]></code>
    </MixedInferredReturnType>
    <MixedOperand>
      <code><![CDATA[$newTokenData['expires_in'] ?? 3600]]></code>
      <code><![CDATA[$token['expires_at']]]></code>
    </MixedOperand>
    <MixedReturnStatement>
      <code><![CDATA[$newTokenData['access_token']]]></code>
      <code><![CDATA[$token['access_token']]]></code>
    </MixedReturnStatement>
    <PossiblyUnusedMethod>
      <code><![CDATA[__construct]]></code>
    </PossiblyUnusedMethod>
    <RiskyTruthyFalsyComparison>
      <code><![CDATA[!$token]]></code>
      <code><![CDATA[$refreshCallback]]></code>
    </RiskyTruthyFalsyComparison>
  </file>
  <file src="lib/Service/WebhookPresets.php">
    <MissingClosureParamType>
      <code><![CDATA[$eventConfig]]></code>
    </MissingClosureParamType>
    <MissingClosureReturnType>
      <code><![CDATA[fn ($eventConfig) => $eventConfig['event']]]></code>
    </MissingClosureReturnType>
    <MixedArgument>
      <code><![CDATA[$preset['events']]]></code>
    </MixedArgument>
    <MixedArrayAccess>
      <code><![CDATA[$eventConfig['event']]]></code>
    </MixedArrayAccess>
    <MixedReturnTypeCoercion>
      <code><![CDATA[array<string>]]></code>
      <code><![CDATA[array_map(
			fn ($eventConfig) => $eventConfig['event'],
			$preset['events']
		)]]></code>
    </MixedReturnTypeCoercion>
    <PossiblyUnusedMethod>
      <code><![CDATA[getPresetEvents]]></code>
    </PossiblyUnusedMethod>
  </file>
  <file src="lib/Settings/Admin.php">
    <DeprecatedMethod>
      <code><![CDATA[getAppValue]]></code>
      <code><![CDATA[getAppValue]]></code>
      <code><![CDATA[getAppValue]]></code>
      <code><![CDATA[getAppValue]]></code>
    </DeprecatedMethod>
    <MixedAssignment>
      <code><![CDATA[$clientId]]></code>
      <code><![CDATA[$clientSecret]]></code>
      <code><![CDATA[$serverUrl]]></code>
    </MixedAssignment>
    <PossiblyUnusedMethod>
      <code><![CDATA[__construct]]></code>
    </PossiblyUnusedMethod>
    <UnusedProperty>
      <code><![CDATA[$client]]></code>
    </UnusedProperty>
  </file>
  <file src="lib/Settings/AdminSection.php">
    <UnusedClass>
      <code><![CDATA[AdminSection]]></code>
    </UnusedClass>
  </file>
  <file src="lib/Settings/AstrolabeAdminSettings.php">
    <PossiblyUnusedMethod>
      <code><![CDATA[__construct]]></code>
    </PossiblyUnusedMethod>
  </file>
  <file src="lib/Settings/Personal.php">
    <InvalidArrayOffset>
      <code><![CDATA[$serverStatus['supports_app_passwords']]]></code>
    </InvalidArrayOffset>
    <MixedArgument>
      <code><![CDATA[$accessToken]]></code>
    </MixedArgument>
    <MixedAssignment>
      <code><![CDATA[$accessToken]]></code>
      <code><![CDATA[$supportsAppPasswords]]></code>
    </MixedAssignment>
    <RiskyTruthyFalsyComparison>
      <code><![CDATA[!$token]]></code>
      <code><![CDATA[$supportsAppPasswords]]></code>
    </RiskyTruthyFalsyComparison>
    <UnusedClass>
      <code><![CDATA[Personal]]></code>
    </UnusedClass>
  </file>
  <file src="lib/Settings/PersonalSection.php">
    <UnusedClass>
      <code><![CDATA[PersonalSection]]></code>
    </UnusedClass>
  </file>
</files>
