Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IConfig: PHP 7.4, global default values #33051

Closed
wants to merge 1 commit into from
Closed

Conversation

ArtificialOwl
Copy link
Member

WIP

  • migrating code to PHP 7.4
  • adding setAppDefaultValues(), setUserDefaultValues(), setSystemDefaultValues()
  • adding setAppValueInt(), setAppValueBool(), setAppValueArray()
  • adding getAppValueInt(), getAppValueBool(), getAppValueArray()
  • adding setUserValueInt(), setUserValueBool(), setUserAppValueArray()
  • adding getUserValueInt(), getUserValueBool(), getUserAppValueArray()
  • warning in logs for long, too long, keys
  • warning in logs to enforce the use of the correct setValue() method

return $this->config->getAppValueInt($this->appName, $key, $default);
}

public function getAppValueBool(string $key): bool {

Check failure

Code scanning / Psalm

InvalidReturnType

Not all code paths of OC\AppFramework\Services\AppConfig::getAppValueBool end in a return statement, return type bool expected
public function getAppValueBool(string $key): bool {
}

public function getAppValueArray(string $key): array {

Check failure

Code scanning / Psalm

InvalidReturnType

Not all code paths of OC\AppFramework\Services\AppConfig::getAppValueArray end in a return statement, return type array<array-key, mixed> expected
public function getUserValue(string $userId, string $key, string $default = ''): string {
return $this->config->getUserValue($userId, $this->appName, $key, $default);
}

public function getUserValueInt(string $userId, string $key): int {

Check failure

Code scanning / Psalm

InvalidReturnType

Not all code paths of OC\AppFramework\Services\AppConfig::getUserValueInt end in a return statement, return type int expected
public function getUserValueInt(string $userId, string $key): int {
}

public function getUserValueBool(string $userId, string $key): bool {

Check failure

Code scanning / Psalm

InvalidReturnType

Not all code paths of OC\AppFramework\Services\AppConfig::getUserValueBool end in a return statement, return type bool expected
public function getUserValueBool(string $userId, string $key): bool {
}

public function getUserValueArray(string $userId, string $key): array {

Check failure

Code scanning / Psalm

InvalidReturnType

Not all code paths of OC\AppFramework\Services\AppConfig::getUserValueArray end in a return statement, return type array<array-key, mixed> expected
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@blizzz blizzz added this to the Nextcloud 29 milestone Nov 23, 2023
@blizzz blizzz added the 2. developing Work in progress label Nov 23, 2023
This was referenced Mar 12, 2024
@Altahrim Altahrim mentioned this pull request Mar 20, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
@skjnldsv skjnldsv closed this Aug 14, 2024
@skjnldsv skjnldsv removed this from the Nextcloud 31 milestone Aug 14, 2024
@skjnldsv skjnldsv deleted the enh/noid/iconfig branch August 30, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants