diff options
author | provokateurin <kate@provokateurin.de> | 2024-09-06 09:44:04 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-09-09 11:09:37 +0200 |
commit | 007be83a968e6aee649ff8de173163cb5ef93a86 (patch) | |
tree | 18e03c4a5562989bbd6482e9e6a47f3619b71e30 /lib/private/AppFramework | |
parent | fc10fa592626d154a91d77d35c93beabdc7605c1 (diff) | |
download | nextcloud-server-fix/oc/inheritdoc.tar.gz nextcloud-server-fix/oc/inheritdoc.zip |
fix(OC): Remove doc blocks for OCP implementationsfix/oc/inheritdoc
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r-- | lib/private/AppFramework/DependencyInjection/DIContainer.php | 16 | ||||
-rw-r--r-- | lib/private/AppFramework/Http/Output.php | 26 | ||||
-rw-r--r-- | lib/private/AppFramework/Http/Request.php | 120 | ||||
-rw-r--r-- | lib/private/AppFramework/Http/RequestId.php | 5 | ||||
-rw-r--r-- | lib/private/AppFramework/Logger.php | 30 | ||||
-rw-r--r-- | lib/private/AppFramework/Services/AppConfig.php | 203 | ||||
-rw-r--r-- | lib/private/AppFramework/Utility/ControllerMethodReflector.php | 19 | ||||
-rw-r--r-- | lib/private/AppFramework/Utility/SimpleContainer.php | 28 | ||||
-rw-r--r-- | lib/private/AppFramework/Utility/TimeFactory.php | 12 |
9 files changed, 0 insertions, 459 deletions
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index a96e050c0e6..11efebeba0d 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -336,17 +336,10 @@ class DIContainer extends SimpleContainer implements IAppContainer { }); } - /** - * @return \OCP\IServerContainer - */ public function getServer() { return $this->server; } - /** - * @param string $middleWare - * @return boolean|null - */ public function registerMiddleWare($middleWare) { if (in_array($middleWare, $this->middleWares, true) !== false) { return false; @@ -354,10 +347,6 @@ class DIContainer extends SimpleContainer implements IAppContainer { $this->middleWares[] = $middleWare; } - /** - * used to return the appname of the set application - * @return string the name of your application - */ public function getAppName() { return $this->query('AppName'); } @@ -383,11 +372,6 @@ class DIContainer extends SimpleContainer implements IAppContainer { return $this->getServer()->getSession()->get('user_id'); } - /** - * Register a capability - * - * @param string $serviceName e.g. 'OCA\Files\Capabilities' - */ public function registerCapability($serviceName) { $this->query('OC\CapabilitiesManager')->registerCapability(function () use ($serviceName) { return $this->query($serviceName); diff --git a/lib/private/AppFramework/Http/Output.php b/lib/private/AppFramework/Http/Output.php index ff0ef1c15ca..8efb60eb291 100644 --- a/lib/private/AppFramework/Http/Output.php +++ b/lib/private/AppFramework/Http/Output.php @@ -23,18 +23,10 @@ class Output implements IOutput { $this->webRoot = $webRoot; } - /** - * @param string $out - */ public function setOutput($out) { print($out); } - /** - * @param string|resource $path or file handle - * - * @return bool false if an error occurred - */ public function setReadfile($path) { if (is_resource($path)) { $output = fopen('php://output', 'w'); @@ -44,36 +36,18 @@ class Output implements IOutput { } } - /** - * @param string $header - */ public function setHeader($header) { header($header); } - /** - * @param int $code sets the http status code - */ public function setHttpResponseCode($code) { http_response_code($code); } - /** - * @return int returns the current http response code - */ public function getHttpResponseCode() { return http_response_code(); } - /** - * @param string $name - * @param string $value - * @param int $expire - * @param string $path - * @param string $domain - * @param bool $secure - * @param bool $httpOnly - */ public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax') { $path = $this->webRoot ? : '/'; diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 4bbeabb7aae..d018058dc2f 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -250,14 +250,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { throw new \RuntimeException('You cannot change the contents of the request object'); } - /** - * Returns the value for a specific http header. - * - * This method returns an empty string if the header did not exist. - * - * @param string $name - * @return string - */ public function getHeader(string $name): string { $name = strtoupper(str_replace('-', '_', $name)); if (isset($this->server['HTTP_' . $name])) { @@ -279,65 +271,28 @@ class Request implements \ArrayAccess, \Countable, IRequest { return ''; } - /** - * Lets you access post and get parameters by the index - * In case of json requests the encoded json body is accessed - * - * @param string $key the key which you want to access in the URL Parameter - * placeholder, $_POST or $_GET array. - * The priority how they're returned is the following: - * 1. URL parameters - * 2. POST parameters - * 3. GET parameters - * @param mixed $default If the key is not found, this value will be returned - * @return mixed the content of the array - */ public function getParam(string $key, $default = null) { return isset($this->parameters[$key]) ? $this->parameters[$key] : $default; } - /** - * Returns all params that were received, be it from the request - * (as GET or POST) or through the URL by the route - * @return array the array with all parameters - */ public function getParams(): array { return is_array($this->parameters) ? $this->parameters : []; } - /** - * Returns the method of the request - * @return string the method of the request (POST, GET, etc) - */ public function getMethod(): string { return $this->method; } - /** - * Shortcut for accessing an uploaded file through the $_FILES array - * @param string $key the key that will be taken from the $_FILES array - * @return array the file in the $_FILES element - */ public function getUploadedFile(string $key) { return isset($this->files[$key]) ? $this->files[$key] : null; } - /** - * Shortcut for getting env variables - * @param string $key the key that will be taken from the $_ENV array - * @return array the value in the $_ENV element - */ public function getEnv(string $key) { return isset($this->env[$key]) ? $this->env[$key] : null; } - /** - * Shortcut for getting cookie variables - * @param string $key the key that will be taken from the $_COOKIE array - * @return string the value in the $_COOKIE element - */ public function getCookie(string $key) { return isset($this->cookies[$key]) ? $this->cookies[$key] : null; } @@ -414,10 +369,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { } - /** - * Checks if the CSRF check was correct - * @return bool true if CSRF check passed - */ public function passesCSRFCheck(): bool { if ($this->csrfTokenManager === null) { return false; @@ -487,13 +438,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return $prefix.$name; } - /** - * Checks if the strict cookie has been sent with the request if the request - * is including any cookies. - * - * @return bool - * @since 9.1.0 - */ public function passesStrictCookieCheck(): bool { if (!$this->cookieCheckRequired()) { return true; @@ -507,13 +451,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return false; } - /** - * Checks if the lax cookie has been sent with the request if the request - * is including any cookies. - * - * @return bool - * @since 9.1.0 - */ public function passesLaxCookieCheck(): bool { if (!$this->cookieCheckRequired()) { return true; @@ -527,11 +464,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { } - /** - * Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging - * If `mod_unique_id` is installed this value will be taken. - * @return string - */ public function getId(): string { return $this->requestId->getId(); } @@ -552,13 +484,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { } } - /** - * Returns the remote address, if the connection came from a trusted proxy - * and `forwarded_for_headers` has been configured then the IP address - * specified in this header will be returned instead. - * Do always use this instead of $_SERVER['REMOTE_ADDR'] - * @return string IP address - */ public function getRemoteAddress(): string { $remoteAddress = isset($this->server['REMOTE_ADDR']) ? $this->server['REMOTE_ADDR'] : ''; $trustedProxies = $this->config->getSystemValue('trusted_proxies', []); @@ -611,11 +536,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return $regex === '//' || preg_match($regex, $remoteAddr) === 1; } - /** - * Returns the server protocol. It respects one or more reverse proxies servers - * and load balancers - * @return string Server protocol (http or https) - */ public function getServerProtocol(): string { if ($this->config->getSystemValueString('overwriteprotocol') !== '' && $this->isOverwriteCondition()) { @@ -645,11 +565,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return 'http'; } - /** - * Returns the used HTTP protocol. - * - * @return string HTTP protocol. HTTP/2, HTTP/1.1 or HTTP/1.0. - */ public function getHttpProtocol(): string { $claimedProtocol = $this->server['SERVER_PROTOCOL']; @@ -670,11 +585,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return 'HTTP/1.1'; } - /** - * Returns the request uri, even if the website uses one or more - * reverse proxies - * @return string - */ public function getRequestUri(): string { $uri = isset($this->server['REQUEST_URI']) ? $this->server['REQUEST_URI'] : ''; if ($this->config->getSystemValueString('overwritewebroot') !== '' && $this->isOverwriteCondition()) { @@ -683,11 +593,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return $uri; } - /** - * Get raw PathInfo from request (not urldecoded) - * @throws \Exception - * @return string Path info - */ public function getRawPathInfo(): string { $requestUri = isset($this->server['REQUEST_URI']) ? $this->server['REQUEST_URI'] : ''; // remove too many slashes - can be caused by reverse proxy configuration @@ -728,21 +633,11 @@ class Request implements \ArrayAccess, \Countable, IRequest { } } - /** - * Get PathInfo from request - * @throws \Exception - * @return string|false Path info or false when not found - */ public function getPathInfo() { $pathInfo = $this->getRawPathInfo(); return \Sabre\HTTP\decodePath($pathInfo); } - /** - * Returns the script name, even if the website uses one or more - * reverse proxies - * @return string the script name - */ public function getScriptName(): string { $name = $this->server['SCRIPT_NAME']; $overwriteWebRoot = $this->config->getSystemValueString('overwritewebroot'); @@ -755,11 +650,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return $name; } - /** - * Checks whether the user agent matches a given regex - * @param array $agent array of agent names - * @return bool true if at least one of the given agent matches, false otherwise - */ public function isUserAgent(array $agent): bool { if (!isset($this->server['HTTP_USER_AGENT'])) { return false; @@ -772,11 +662,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { return false; } - /** - * Returns the unverified server host from the headers without checking - * whether it is a trusted domain - * @return string Server host - */ public function getInsecureServerHost(): string { if ($this->fromTrustedProxy() && $this->getOverwriteHost() !== null) { return $this->getOverwriteHost(); @@ -802,11 +687,6 @@ class Request implements \ArrayAccess, \Countable, IRequest { } - /** - * Returns the server host from the headers, or the first configured - * trusted domain if the host isn't in the trusted list - * @return string Server host - */ public function getServerHost(): string { // overwritehost is always trusted $host = $this->getOverwriteHost(); diff --git a/lib/private/AppFramework/Http/RequestId.php b/lib/private/AppFramework/Http/RequestId.php index c3a99c93591..6953cf3f9cb 100644 --- a/lib/private/AppFramework/Http/RequestId.php +++ b/lib/private/AppFramework/Http/RequestId.php @@ -20,11 +20,6 @@ class RequestId implements IRequestId { $this->secureRandom = $secureRandom; } - /** - * Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging - * If `mod_unique_id` is installed this value will be taken. - * @return string - */ public function getId(): string { if (empty($this->requestId)) { $validChars = ISecureRandom::CHAR_ALPHANUMERIC; diff --git a/lib/private/AppFramework/Logger.php b/lib/private/AppFramework/Logger.php index 4ae4e6cae34..0da4ac8289a 100644 --- a/lib/private/AppFramework/Logger.php +++ b/lib/private/AppFramework/Logger.php @@ -36,72 +36,42 @@ class Logger implements ILogger { return $context; } - /** - * @deprecated - */ public function emergency(string $message, array $context = []) { $this->logger->emergency($message, $this->extendContext($context)); } - /** - * @deprecated - */ public function alert(string $message, array $context = []) { $this->logger->alert($message, $this->extendContext($context)); } - /** - * @deprecated - */ public function critical(string $message, array $context = []) { $this->logger->critical($message, $this->extendContext($context)); } - /** - * @deprecated - */ public function error(string $message, array $context = []) { $this->logger->emergency($message, $this->extendContext($context)); } - /** - * @deprecated - */ public function warning(string $message, array $context = []) { $this->logger->warning($message, $this->extendContext($context)); } - /** - * @deprecated - */ public function notice(string $message, array $context = []) { $this->logger->notice($message, $this->extendContext($context)); } - /** - * @deprecated - */ public function info(string $message, array $context = []) { $this->logger->info($message, $this->extendContext($context)); } - /** - * @deprecated - */ public function debug(string $message, array $context = []) { $this->logger->debug($message, $this->extendContext($context)); } - /** - * @deprecated - */ public function log(int $level, string $message, array $context = []) { $this->logger->log($level, $message, $this->extendContext($context)); } - /** - * @deprecated - */ public function logException(\Throwable $exception, array $context = []) { $this->logger->logException($exception, $this->extendContext($context)); } diff --git a/lib/private/AppFramework/Services/AppConfig.php b/lib/private/AppFramework/Services/AppConfig.php index e47bbc429d0..28970948217 100644 --- a/lib/private/AppFramework/Services/AppConfig.php +++ b/lib/private/AppFramework/Services/AppConfig.php @@ -8,11 +8,7 @@ declare(strict_types=1); */ namespace OC\AppFramework\Services; -use InvalidArgumentException; -use JsonException; use OCP\AppFramework\Services\IAppConfig; -use OCP\Exceptions\AppConfigTypeConflictException; -use OCP\Exceptions\AppConfigUnknownKeyException; use OCP\IConfig; class AppConfig implements IAppConfig { @@ -24,94 +20,31 @@ class AppConfig implements IAppConfig { ) { } - /** - * @inheritDoc - * - * @return string[] list of stored config keys - * @since 20.0.0 - */ public function getAppKeys(): array { return $this->appConfig->getKeys($this->appName); } - /** - * @inheritDoc - * - * @param string $key config key - * @param bool|null $lazy TRUE to search within lazy loaded config, NULL to search within all config - * - * @return bool TRUE if key exists - * @since 29.0.0 - */ public function hasAppKey(string $key, ?bool $lazy = false): bool { return $this->appConfig->hasKey($this->appName, $key, $lazy); } - /** - * @param string $key config key - * @param bool|null $lazy TRUE to search within lazy loaded config, NULL to search within all config - * - * @return bool - * @throws AppConfigUnknownKeyException if config key is not known - * @since 29.0.0 - */ public function isSensitive(string $key, ?bool $lazy = false): bool { return $this->appConfig->isSensitive($this->appName, $key, $lazy); } - /** - * @inheritDoc - * - * @param string $key config key - * - * @return bool TRUE if config is lazy loaded - * @throws AppConfigUnknownKeyException if config key is not known - * @see \OCP\IAppConfig for details about lazy loading - * @since 29.0.0 - */ public function isLazy(string $key): bool { return $this->appConfig->isLazy($this->appName, $key); } - /** - * @inheritDoc - * - * @param string $key config keys prefix to search - * @param bool $filtered TRUE to hide sensitive config values. Value are replaced by {@see IConfig::SENSITIVE_VALUE} - * - * @return array<string, string|int|float|bool|array> [configKey => configValue] - * @since 29.0.0 - */ public function getAllAppValues(string $key = '', bool $filtered = false): array { return $this->appConfig->getAllValues($this->appName, $key, $filtered); } - /** - * @inheritDoc - * - * @param string $key the key of the value, under which will be saved - * @param string $value the value that should be stored - * @since 20.0.0 - * @deprecated 29.0.0 use {@see setAppValueString()} - */ public function setAppValue(string $key, string $value): void { /** @psalm-suppress InternalMethod */ $this->appConfig->setValueMixed($this->appName, $key, $value); } - /** - * @inheritDoc - * - * @param string $key config key - * @param string $value config value - * @param bool $lazy set config as lazy loaded - * @param bool $sensitive if TRUE value will be hidden when listing config values. - * - * @return bool TRUE if value was different, therefor updated in database - * @throws AppConfigTypeConflictException if type from database is not VALUE_MIXED and different from the requested one - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function setAppValueString( string $key, string $value, @@ -121,19 +54,6 @@ class AppConfig implements IAppConfig { return $this->appConfig->setValueString($this->appName, $key, $value, $lazy, $sensitive); } - /** - * @inheritDoc - * - * @param string $key config key - * @param int $value config value - * @param bool $lazy set config as lazy loaded - * @param bool $sensitive if TRUE value will be hidden when listing config values. - * - * @return bool TRUE if value was different, therefor updated in database - * @throws AppConfigTypeConflictException if type from database is not VALUE_MIXED and different from the requested one - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function setAppValueInt( string $key, int $value, @@ -143,19 +63,6 @@ class AppConfig implements IAppConfig { return $this->appConfig->setValueInt($this->appName, $key, $value, $lazy, $sensitive); } - /** - * @inheritDoc - * - * @param string $key config key - * @param float $value config value - * @param bool $lazy set config as lazy loaded - * @param bool $sensitive if TRUE value will be hidden when listing config values. - * - * @return bool TRUE if value was different, therefor updated in database - * @throws AppConfigTypeConflictException if type from database is not VALUE_MIXED and different from the requested one - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function setAppValueFloat( string $key, float $value, @@ -165,18 +72,6 @@ class AppConfig implements IAppConfig { return $this->appConfig->setValueFloat($this->appName, $key, $value, $lazy, $sensitive); } - /** - * @inheritDoc - * - * @param string $key config key - * @param bool $value config value - * @param bool $lazy set config as lazy loaded - * - * @return bool TRUE if value was different, therefor updated in database - * @throws AppConfigTypeConflictException if type from database is not VALUE_MIXED and different from the requested one - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function setAppValueBool( string $key, bool $value, @@ -185,20 +80,6 @@ class AppConfig implements IAppConfig { return $this->appConfig->setValueBool($this->appName, $key, $value, $lazy); } - /** - * @inheritDoc - * - * @param string $key config key - * @param array $value config value - * @param bool $lazy set config as lazy loaded - * @param bool $sensitive if TRUE value will be hidden when listing config values. - * - * @return bool TRUE if value was different, therefor updated in database - * @throws AppConfigTypeConflictException if type from database is not VALUE_MIXED and different from the requested one - * @throws JsonException - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function setAppValueArray( string $key, array $value, @@ -208,120 +89,36 @@ class AppConfig implements IAppConfig { return $this->appConfig->setValueArray($this->appName, $key, $value, $lazy, $sensitive); } - /** - * @param string $key - * @param string $default - * - * @since 20.0.0 - * @deprecated 29.0.0 use {@see getAppValueString()} - * @return string - */ public function getAppValue(string $key, string $default = ''): string { /** @psalm-suppress InternalMethod */ /** @psalm-suppress UndefinedInterfaceMethod */ return $this->appConfig->getValueMixed($this->appName, $key, $default); } - /** - * @inheritDoc - * - * @param string $key config key - * @param string $default default value - * @param bool $lazy search within lazy loaded config - * - * @return string stored config value or $default if not set in database - * @throws InvalidArgumentException if one of the argument format is invalid - * @throws AppConfigTypeConflictException in case of conflict with the value type set in database - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function getAppValueString(string $key, string $default = '', bool $lazy = false): string { return $this->appConfig->getValueString($this->appName, $key, $default, $lazy); } - /** - * @inheritDoc - * - * @param string $key config key - * @param int $default default value - * @param bool $lazy search within lazy loaded config - * - * @return int stored config value or $default if not set in database - * @throws InvalidArgumentException if one of the argument format is invalid - * @throws AppConfigTypeConflictException in case of conflict with the value type set in database - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function getAppValueInt(string $key, int $default = 0, bool $lazy = false): int { return $this->appConfig->getValueInt($this->appName, $key, $default, $lazy); } - /** - * @inheritDoc - * - * @param string $key config key - * @param float $default default value - * @param bool $lazy search within lazy loaded config - * - * @return float stored config value or $default if not set in database - * @throws InvalidArgumentException if one of the argument format is invalid - * @throws AppConfigTypeConflictException in case of conflict with the value type set in database - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function getAppValueFloat(string $key, float $default = 0, bool $lazy = false): float { return $this->appConfig->getValueFloat($this->appName, $key, $default, $lazy); } - /** - * @inheritDoc - * - * @param string $key config key - * @param bool $default default value - * @param bool $lazy search within lazy loaded config - * - * @return bool stored config value or $default if not set in database - * @throws InvalidArgumentException if one of the argument format is invalid - * @throws AppConfigTypeConflictException in case of conflict with the value type set in database - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function getAppValueBool(string $key, bool $default = false, bool $lazy = false): bool { return $this->appConfig->getValueBool($this->appName, $key, $default, $lazy); } - /** - * @inheritDoc - * - * @param string $key config key - * @param array $default default value - * @param bool $lazy search within lazy loaded config - * - * @return array stored config value or $default if not set in database - * @throws InvalidArgumentException if one of the argument format is invalid - * @throws AppConfigTypeConflictException in case of conflict with the value type set in database - * @since 29.0.0 - * @see \OCP\IAppConfig for explanation about lazy loading - */ public function getAppValueArray(string $key, array $default = [], bool $lazy = false): array { return $this->appConfig->getValueArray($this->appName, $key, $default, $lazy); } - /** - * @inheritDoc - * - * @param string $key the key of the value, under which it was saved - * @since 20.0.0 - */ public function deleteAppValue(string $key): void { $this->appConfig->deleteKey($this->appName, $key); } - /** - * @inheritDoc - * - * @since 20.0.0 - */ public function deleteAppValues(): void { $this->appConfig->deleteApp($this->appName); } diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php index 2031327dfae..b8a6233c0fd 100644 --- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php +++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php @@ -19,10 +19,6 @@ class ControllerMethodReflector implements IControllerMethodReflector { private $parameters = []; private array $ranges = []; - /** - * @param object $object an object or classname - * @param string $method the method which we want to inspect - */ public function reflect($object, string $method) { $reflection = new \ReflectionMethod($object, $method); $docs = $reflection->getDocComment(); @@ -79,13 +75,6 @@ class ControllerMethodReflector implements IControllerMethodReflector { } } - /** - * Inspects the PHPDoc parameters for types - * @param string $parameter the parameter whose type comments should be - * parsed - * @return string|null type in the type parameters (@param int $something) - * would return int or null if not existing - */ public function getType(string $parameter) { if (array_key_exists($parameter, $this->types)) { return $this->types[$parameter]; @@ -102,18 +91,10 @@ class ControllerMethodReflector implements IControllerMethodReflector { return null; } - /** - * @return array the arguments of the method with key => default value - */ public function getParameters(): array { return $this->parameters; } - /** - * Check if a method contains an annotation - * @param string $name the name of the annotation - * @return bool true if the annotation is found - */ public function hasAnnotation(string $name): bool { $name = strtolower($name); return array_key_exists($name, $this->annotations); diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php index 56de4a34cf6..5933a30833c 100644 --- a/lib/private/AppFramework/Utility/SimpleContainer.php +++ b/lib/private/AppFramework/Utility/SimpleContainer.php @@ -30,14 +30,6 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer { $this->container = new Container(); } - /** - * @template T - * @param class-string<T>|string $id - * @return T|mixed - * @psalm-template S as class-string<T>|string - * @psalm-param S $id - * @psalm-return (S is class-string<T> ? T : mixed) - */ public function get(string $id): mixed { return $this->query($id); } @@ -131,23 +123,10 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer { throw new QueryNotFoundException('Could not resolve ' . $name . '!'); } - /** - * @param string $name - * @param mixed $value - */ public function registerParameter($name, $value) { $this[$name] = $value; } - /** - * The given closure is call the first time the given service is queried. - * The closure has to return the instance for the given service. - * Created instance will be cached in case $shared is true. - * - * @param string $name name of the service to register another backend for - * @param Closure $closure the closure to be called on service creation - * @param bool $shared - */ public function registerService($name, Closure $closure, $shared = true) { $wrapped = function () use ($closure) { return $closure($this); @@ -163,13 +142,6 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer { } } - /** - * Shortcut for returning a service from a service under a different key, - * e.g. to tell the container to return a class when queried for an - * interface - * @param string $alias the alias that should be registered - * @param string $target the target that should be resolved instead - */ public function registerAlias($alias, $target) { $this->registerService($alias, function (ContainerInterface $container) use ($target) { return $container->get($target); diff --git a/lib/private/AppFramework/Utility/TimeFactory.php b/lib/private/AppFramework/Utility/TimeFactory.php index 0584fd05ef9..ed6c5f93213 100644 --- a/lib/private/AppFramework/Utility/TimeFactory.php +++ b/lib/private/AppFramework/Utility/TimeFactory.php @@ -24,22 +24,10 @@ class TimeFactory implements ITimeFactory { $this->timezone = new \DateTimeZone('UTC'); } - /** - * @return int the result of a call to time() - * @since 8.0.0 - * @deprecated 26.0.0 {@see ITimeFactory::now()} - */ public function getTime(): int { return time(); } - /** - * @param string $time - * @param \DateTimeZone $timezone - * @return \DateTime - * @since 15.0.0 - * @deprecated 26.0.0 {@see ITimeFactory::now()} - */ public function getDateTime(string $time = 'now', ?\DateTimeZone $timezone = null): \DateTime { return new \DateTime($time, $timezone); } |