-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
From PR #401 code review - Low priority code quality improvement.
Problem
IdpTokenRefresher.php class properties lack type declarations, which are supported in PHP 7.4+.
Current Code:
class IdpTokenRefresher {
private $config;
private $httpClient;
private $logger;
private $mcpServerClient;Proposed Improvement:
class IdpTokenRefresher {
private IConfig $config;
private IClient $httpClient;
private LoggerInterface $logger;
private McpServerClient $mcpServerClient;Benefits
- Better IDE autocomplete and type checking
- Catches type errors at development time
- Improves code documentation
- Aligns with modern PHP standards
Implementation Notes
- Verify Nextcloud's minimum PHP version supports typed properties (PHP 7.4+)
- Add return type declarations to methods as well
- Consider using strict_types declaration at file level
References
- File: third_party/astrolabe/lib/Service/IdpTokenRefresher.php
- Related to PR feat(astrolabe): Nextcloud app UI with PDF viewer, webhooks, and OAuth refresh #401 code review
- PHP Typed Properties: https://www.php.net/manual/en/language.types.declarations.php
Priority
Low - Code quality improvement, no functional change
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request