Browse Source

fix(NCU): removing all @since

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/49636/head
Maxence Lange 11 months ago
parent
commit
b791cc987e
  1. 1
      lib/unstable/Config/Exceptions/IncorrectTypeException.php
  2. 1
      lib/unstable/Config/Exceptions/TypeConflictException.php
  3. 1
      lib/unstable/Config/Exceptions/UnknownKeyException.php
  4. 43
      lib/unstable/Config/IUserConfig.php
  5. 9
      lib/unstable/Config/ValueType.php

1
lib/unstable/Config/Exceptions/IncorrectTypeException.php

@ -12,7 +12,6 @@ use Exception;
/**
* @experimental 31.0.0
* @since 31.0.0
*/
class IncorrectTypeException extends Exception {
}

1
lib/unstable/Config/Exceptions/TypeConflictException.php

@ -12,7 +12,6 @@ use Exception;
/**
* @experimental 31.0.0
* @since 31.0.0
*/
class TypeConflictException extends Exception {
}

1
lib/unstable/Config/Exceptions/UnknownKeyException.php

@ -12,7 +12,6 @@ use Exception;
/**
* @experimental 31.0.0
* @since 31.0.0
*/
class UnknownKeyException extends Exception {
}

43
lib/unstable/Config/IUserConfig.php

@ -28,17 +28,14 @@ use NCU\Config\Exceptions\UnknownKeyException;
* during specific requests or actions to avoid loading the lazy values all the time.
*
* @experimental 31.0.0
* @since 31.0.0
*/
interface IUserConfig {
/**
* @experimental 31.0.0
* @since 31.0.0
*/
public const FLAG_SENSITIVE = 1; // value is sensitive
/**
* @experimental 31.0.0
* @since 31.0.0
*/
public const FLAG_INDEXED = 2; // value should be indexed
@ -53,7 +50,6 @@ interface IUserConfig {
* @return list<string> list of userIds
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getUserIds(string $appId = ''): array;
@ -68,7 +64,6 @@ interface IUserConfig {
* @return list<string> list of app ids
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getApps(string $userId): array;
@ -84,7 +79,6 @@ interface IUserConfig {
* @return list<string> list of stored config keys
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getKeys(string $userId, string $app): array;
@ -99,7 +93,6 @@ interface IUserConfig {
* @return bool TRUE if key exists
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function hasKey(string $userId, string $app, string $key, ?bool $lazy = false): bool;
@ -115,7 +108,6 @@ interface IUserConfig {
* @throws UnknownKeyException if config key is not known
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function isSensitive(string $userId, string $app, string $key, ?bool $lazy = false): bool;
@ -136,7 +128,6 @@ interface IUserConfig {
* @throws UnknownKeyException if config key is not known
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function isIndexed(string $userId, string $app, string $key, ?bool $lazy = false): bool;
@ -154,7 +145,6 @@ interface IUserConfig {
* @see IUserConfig for details about lazy loading
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function isLazy(string $userId, string $app, string $key): bool;
@ -172,7 +162,6 @@ interface IUserConfig {
* @return array<string, string|int|float|bool|array> [key => value]
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getValues(string $userId, string $app, string $prefix = '', bool $filtered = false): array;
@ -188,7 +177,6 @@ interface IUserConfig {
* @return array<string, string|int|float|bool|array> [key => value]
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getAllValues(string $userId, bool $filtered = false): array;
@ -204,7 +192,6 @@ interface IUserConfig {
* @return array<string, string|int|float|bool|array> [appId => value]
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getValuesByApps(string $userId, string $key, bool $lazy = false, ?ValueType $typedAs = null): array;
@ -222,7 +209,6 @@ interface IUserConfig {
* @return array<string, string|int|float|bool|array> [userId => value]
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getValuesByUsers(string $app, string $key, ?ValueType $typedAs = null, ?array $userIds = null): array;
@ -240,7 +226,6 @@ interface IUserConfig {
* @return Generator<string>
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function searchUsersByValueString(string $app, string $key, string $value, bool $caseInsensitive = false): Generator;
@ -257,7 +242,6 @@ interface IUserConfig {
* @return Generator<string>
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function searchUsersByValueInt(string $app, string $key, int $value): Generator;
@ -274,7 +258,6 @@ interface IUserConfig {
* @return Generator<string>
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function searchUsersByValues(string $app, string $key, array $values): Generator;
@ -291,7 +274,6 @@ interface IUserConfig {
* @return Generator<string>
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function searchUsersByValueBool(string $app, string $key, bool $value): Generator;
@ -309,7 +291,6 @@ interface IUserConfig {
* @return string stored config value or $default if not set in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see getValueInt()
@ -333,7 +314,6 @@ interface IUserConfig {
* @return int stored config value or $default if not set in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see getValueString()
@ -357,7 +337,6 @@ interface IUserConfig {
* @return float stored config value or $default if not set in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see getValueString()
@ -381,7 +360,6 @@ interface IUserConfig {
* @return bool stored config value or $default if not set in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserPrefences for explanation about lazy loading
* @see getValueString()
@ -405,7 +383,6 @@ interface IUserConfig {
* @return array stored config value or $default if not set in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see getValueString()
@ -431,7 +408,6 @@ interface IUserConfig {
* @throws IncorrectTypeException if config value type is not known
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getValueType(string $userId, string $app, string $key, ?bool $lazy = null): ValueType;
@ -451,7 +427,6 @@ interface IUserConfig {
* @throws IncorrectTypeException if config value type is not known
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getValueFlags(string $userId, string $app, string $key, bool $lazy = false): int;
@ -473,7 +448,6 @@ interface IUserConfig {
* @return bool TRUE if value was different, therefor updated in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see setValueInt()
@ -506,7 +480,6 @@ interface IUserConfig {
* @return bool TRUE if value was different, therefor updated in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see setValueString()
@ -534,7 +507,6 @@ interface IUserConfig {
* @return bool TRUE if value was different, therefor updated in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see setValueString()
@ -561,7 +533,6 @@ interface IUserConfig {
* @return bool TRUE if value was different, therefor updated in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see setValueString()
@ -589,7 +560,6 @@ interface IUserConfig {
* @return bool TRUE if value was different, therefor updated in database
*
* @experimental 31.0.0
* @since 31.0.0
*
* @see IUserConfig for explanation about lazy loading
* @see setValueString()
@ -612,7 +582,6 @@ interface IUserConfig {
* @return bool TRUE if database update were necessary
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function updateSensitive(string $userId, string $app, string $key, bool $sensitive): bool;
@ -626,7 +595,6 @@ interface IUserConfig {
* @param bool $sensitive TRUE to set as sensitive, FALSE to unset
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function updateGlobalSensitive(string $app, string $key, bool $sensitive): void;
@ -644,7 +612,6 @@ interface IUserConfig {
* @return bool TRUE if database update were necessary
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function updateIndexed(string $userId, string $app, string $key, bool $indexed): bool;
@ -658,7 +625,6 @@ interface IUserConfig {
* @param bool $indexed TRUE to set as indexed, FALSE to unset
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function updateGlobalIndexed(string $app, string $key, bool $indexed): void;
@ -673,7 +639,6 @@ interface IUserConfig {
* @return bool TRUE if database update was necessary
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function updateLazy(string $userId, string $app, string $key, bool $lazy): bool;
@ -687,7 +652,6 @@ interface IUserConfig {
* @param bool $lazy TRUE to set as lazy loaded, FALSE to unset
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function updateGlobalLazy(string $app, string $key, bool $lazy): void;
@ -714,7 +678,6 @@ interface IUserConfig {
* @throws UnknownKeyException if config key is not known in database
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getDetails(string $userId, string $app, string $key): array;
@ -726,7 +689,6 @@ interface IUserConfig {
* @param string $key config key
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function deleteUserConfig(string $userId, string $app, string $key): void;
@ -737,7 +699,6 @@ interface IUserConfig {
* @param string $key config key
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function deleteKey(string $app, string $key): void;
@ -747,7 +708,6 @@ interface IUserConfig {
* @param string $app id of the app
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function deleteApp(string $app): void;
@ -757,7 +717,6 @@ interface IUserConfig {
* @param string $userId id of the user
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function deleteAllUserConfig(string $userId): void;
@ -770,7 +729,6 @@ interface IUserConfig {
* @param bool $reload set to TRUE to refill cache instantly after clearing it
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function clearCache(string $userId, bool $reload = false): void;
@ -779,7 +737,6 @@ interface IUserConfig {
* The cache will be rebuilt only the next time a user config is requested.
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function clearCacheAll(): void;
}

9
lib/unstable/Config/ValueType.php

@ -15,37 +15,30 @@ use UnhandledMatchError;
* Listing of available value type for typed config value
*
* @experimental 31.0.0
* @since 31.0.0
*/
enum ValueType: int {
/**
* @experimental 31.0.0
* @since 31.0.0
*/
case MIXED = 0;
/**
* @experimental 31.0.0
* @since 31.0.0
*/
case STRING = 1;
/**
* @experimental 31.0.0
* @since 31.0.0
*/
case INT = 2;
/**
* @experimental 31.0.0
* @since 31.0.0
*/
case FLOAT = 3;
/**
* @experimental 31.0.0
* @since 31.0.0
*/
case BOOL = 4;
/**
* @experimental 31.0.0
* @since 31.0.0
*/
case ARRAY = 5;
@ -58,7 +51,6 @@ enum ValueType: int {
* @throws IncorrectTypeException
*
* @experimental 31.0.0
* @since 31.0.0
*/
public static function fromStringDefinition(string $definition): self {
try {
@ -82,7 +74,6 @@ enum ValueType: int {
* @throws IncorrectTypeException
*
* @experimental 31.0.0
* @since 31.0.0
*/
public function getDefinition(): string {
try {

Loading…
Cancel
Save