summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-20 11:45:08 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-01-20 11:45:08 +0100
commitf5c361cf44739058b79f322576a1bad2d8c142d9 (patch)
treea22217c6995751023112832d191d213e494e2fbc /lib/private/AppFramework
parent37bb33c5799b834dfef3fb73936bd0e5a4773fb8 (diff)
downloadnextcloud-server-f5c361cf44739058b79f322576a1bad2d8c142d9.tar.gz
nextcloud-server-f5c361cf44739058b79f322576a1bad2d8c142d9.zip
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r--lib/private/AppFramework/App.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/ARegistration.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/BootContext.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/Coordinator.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/EventListenerRegistration.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/FunctionInjector.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/ParameterRegistration.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php1
-rw-r--r--lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php1
-rw-r--r--lib/private/AppFramework/Http/Dispatcher.php5
-rw-r--r--lib/private/AppFramework/Http/Request.php2
-rw-r--r--lib/private/AppFramework/Logger.php1
-rw-r--r--lib/private/AppFramework/Middleware/CompressionMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/MiddlewareDispatcher.php1
-rw-r--r--lib/private/AppFramework/Middleware/OCSMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/CORSMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/CSPMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php1
-rw-r--r--lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php11
-rw-r--r--lib/private/AppFramework/Middleware/SessionMiddleware.php1
-rw-r--r--lib/private/AppFramework/Routing/RouteConfig.php1
-rw-r--r--lib/private/AppFramework/ScopedPsrLogger.php1
-rw-r--r--lib/private/AppFramework/Services/AppConfig.php1
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php1
-rw-r--r--lib/private/AppFramework/Utility/TimeFactory.php2
29 files changed, 7 insertions, 38 deletions
diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php
index 170acba0689..d2ef7da9e46 100644
--- a/lib/private/AppFramework/App.php
+++ b/lib/private/AppFramework/App.php
@@ -53,7 +53,6 @@ use OCP\IRequest;
* Handles all the dependency injection, controllers and output flow
*/
class App {
-
/** @var string[] */
private static $nameSpaceCache = [];
diff --git a/lib/private/AppFramework/Bootstrap/ARegistration.php b/lib/private/AppFramework/Bootstrap/ARegistration.php
index bb8fe0c8e92..797d7d2317b 100644
--- a/lib/private/AppFramework/Bootstrap/ARegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ARegistration.php
@@ -29,7 +29,6 @@ namespace OC\AppFramework\Bootstrap;
* @psalm-immutable
*/
abstract class ARegistration {
-
/** @var string */
private $appId;
diff --git a/lib/private/AppFramework/Bootstrap/BootContext.php b/lib/private/AppFramework/Bootstrap/BootContext.php
index f21d7d00b1e..8c37d00a419 100644
--- a/lib/private/AppFramework/Bootstrap/BootContext.php
+++ b/lib/private/AppFramework/Bootstrap/BootContext.php
@@ -31,7 +31,6 @@ use OCP\AppFramework\IAppContainer;
use OCP\IServerContainer;
class BootContext implements IBootContext {
-
/** @var IAppContainer */
private $appContainer;
diff --git a/lib/private/AppFramework/Bootstrap/Coordinator.php b/lib/private/AppFramework/Bootstrap/Coordinator.php
index 3ab6ac4c8b0..f5f50b1b775 100644
--- a/lib/private/AppFramework/Bootstrap/Coordinator.php
+++ b/lib/private/AppFramework/Bootstrap/Coordinator.php
@@ -46,7 +46,6 @@ use Psr\Log\LoggerInterface;
use Throwable;
class Coordinator {
-
/** @var IServerContainer */
private $serverContainer;
diff --git a/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php b/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php
index be279cbfd52..2ad410be26f 100644
--- a/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php
@@ -30,7 +30,6 @@ namespace OC\AppFramework\Bootstrap;
* @template-extends ServiceRegistration<\OCP\EventDispatcher\IEventListener>
*/
class EventListenerRegistration extends ServiceRegistration {
-
/** @var string */
private $event;
diff --git a/lib/private/AppFramework/Bootstrap/FunctionInjector.php b/lib/private/AppFramework/Bootstrap/FunctionInjector.php
index 13eb5d88969..2f95906ab4c 100644
--- a/lib/private/AppFramework/Bootstrap/FunctionInjector.php
+++ b/lib/private/AppFramework/Bootstrap/FunctionInjector.php
@@ -33,7 +33,6 @@ use ReflectionParameter;
use function array_map;
class FunctionInjector {
-
/** @var ContainerInterface */
private $container;
diff --git a/lib/private/AppFramework/Bootstrap/ParameterRegistration.php b/lib/private/AppFramework/Bootstrap/ParameterRegistration.php
index 5a683f41a9f..b501a757abd 100644
--- a/lib/private/AppFramework/Bootstrap/ParameterRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ParameterRegistration.php
@@ -29,7 +29,6 @@ namespace OC\AppFramework\Bootstrap;
* @psalm-immutable
*/
final class ParameterRegistration extends ARegistration {
-
/** @var string */
private $name;
diff --git a/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php b/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php
index 47c25d39300..36c5cae7db3 100644
--- a/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/PreviewProviderRegistration.php
@@ -30,7 +30,6 @@ namespace OC\AppFramework\Bootstrap;
* @template-extends ServiceRegistration<\OCP\Preview\IProviderV2>
*/
class PreviewProviderRegistration extends ServiceRegistration {
-
/** @var string */
private $mimeTypeRegex;
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index 3ade98e334f..04faf330dc3 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -58,7 +58,6 @@ use Psr\Log\LoggerInterface;
use Throwable;
class RegistrationContext {
-
/** @var ServiceRegistration<ICapability>[] */
private $capabilities = [];
diff --git a/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php b/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php
index a8b9ddd1295..e2b115e0353 100644
--- a/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ServiceAliasRegistration.php
@@ -29,7 +29,6 @@ namespace OC\AppFramework\Bootstrap;
* @psalm-immutable
*/
class ServiceAliasRegistration extends ARegistration {
-
/**
* @var string
* @psalm-var string|class-string
diff --git a/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php b/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php
index 21e6d37865a..b6658e55239 100644
--- a/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php
+++ b/lib/private/AppFramework/Bootstrap/ServiceFactoryRegistration.php
@@ -29,7 +29,6 @@ namespace OC\AppFramework\Bootstrap;
* @psalm-immutable
*/
class ServiceFactoryRegistration extends ARegistration {
-
/**
* @var string
* @psalm-var string|class-string
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php
index cc288edc966..b4b03574d56 100644
--- a/lib/private/AppFramework/Http/Dispatcher.php
+++ b/lib/private/AppFramework/Http/Dispatcher.php
@@ -49,7 +49,6 @@ use Psr\Log\LoggerInterface;
* Class to dispatch the request to the middleware dispatcher
*/
class Dispatcher {
-
/** @var MiddlewareDispatcher */
private $middlewareDispatcher;
@@ -169,7 +168,7 @@ class Dispatcher {
} catch (\Throwable $throwable) {
$exception = new \Exception($throwable->getMessage() . ' in file \'' . $throwable->getFile() . '\' line ' . $throwable->getLine(), $throwable->getCode(), $throwable);
$response = $this->middlewareDispatcher->afterException(
- $controller, $methodName, $exception);
+ $controller, $methodName, $exception);
}
$response = $this->middlewareDispatcher->afterController(
@@ -202,7 +201,6 @@ class Dispatcher {
$types = ['int', 'integer', 'bool', 'boolean', 'float', 'double'];
foreach ($this->reflector->getParameters() as $param => $default) {
-
// try to get the parameter from the request object and cast
// it to the type annotated in the @param annotation
$value = $this->request->getParam($param, $default);
@@ -234,7 +232,6 @@ class Dispatcher {
// format response
if ($response instanceof DataResponse || !($response instanceof Response)) {
-
// get format from the url format or request format parameter
$format = $this->request->getParam('format');
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index d8aac063f3e..ac162f6565e 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -429,7 +429,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
$this->items['post'] = $params;
}
}
- // Handle application/x-www-form-urlencoded for methods other than GET
+ // Handle application/x-www-form-urlencoded for methods other than GET
// or post correctly
} elseif ($this->method !== 'GET'
&& $this->method !== 'POST'
diff --git a/lib/private/AppFramework/Logger.php b/lib/private/AppFramework/Logger.php
index 7fb30905df3..cd70cead7e9 100644
--- a/lib/private/AppFramework/Logger.php
+++ b/lib/private/AppFramework/Logger.php
@@ -32,7 +32,6 @@ use OCP\ILogger;
* @deprecated
*/
class Logger implements ILogger {
-
/** @var ILogger */
private $logger;
diff --git a/lib/private/AppFramework/Middleware/CompressionMiddleware.php b/lib/private/AppFramework/Middleware/CompressionMiddleware.php
index 5128afa8cad..530c270c7bc 100644
--- a/lib/private/AppFramework/Middleware/CompressionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/CompressionMiddleware.php
@@ -35,7 +35,6 @@ use OCP\AppFramework\Middleware;
use OCP\IRequest;
class CompressionMiddleware extends Middleware {
-
/** @var bool */
private $useGZip;
diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
index adf17e53caa..35eb0098eed 100644
--- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
+++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
@@ -39,7 +39,6 @@ use OCP\AppFramework\Middleware;
* This class is used to store and run all the middleware in correct order
*/
class MiddlewareDispatcher {
-
/**
* @var array array containing all the middlewares
*/
diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php
index 4c2dbd0f828..955b15f80c8 100644
--- a/lib/private/AppFramework/Middleware/OCSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php
@@ -39,7 +39,6 @@ use OCP\AppFramework\OCSController;
use OCP\IRequest;
class OCSMiddleware extends Middleware {
-
/** @var IRequest */
private $request;
diff --git a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
index d956ce58912..f20bd333452 100644
--- a/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
+++ b/lib/private/AppFramework/Middleware/PublicShare/PublicShareMiddleware.php
@@ -35,7 +35,6 @@ use OCP\IRequest;
use OCP\ISession;
class PublicShareMiddleware extends Middleware {
-
/** @var IRequest */
private $request;
diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
index dd964915006..2476f4ec9b3 100644
--- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
@@ -118,7 +118,6 @@ class CORSMiddleware extends Middleware {
if (isset($this->request->server['HTTP_ORIGIN']) &&
$this->reflector->hasAnnotation('CORS')) {
-
// allow credentials headers must not be true or CSRF is possible
// otherwise
foreach ($response->getHeaders() as $header => $value) {
diff --git a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php
index 1eea52d620c..ae0dc1f134e 100644
--- a/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CSPMiddleware.php
@@ -36,7 +36,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class CSPMiddleware extends Middleware {
-
/** @var ContentSecurityPolicyManager */
private $contentSecurityPolicyManager;
/** @var ContentSecurityPolicyNonceManager */
diff --git a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php
index 534ff56cced..418d4185184 100644
--- a/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php
@@ -33,7 +33,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class FeaturePolicyMiddleware extends Middleware {
-
/** @var FeaturePolicyManager */
private $policyManager;
diff --git a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
index 0ab5d061c44..e6d35dc66f2 100644
--- a/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php
@@ -31,7 +31,6 @@ use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
class SameSiteCookieMiddleware extends Middleware {
-
/** @var Request */
private $request;
diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
index e0f36231b68..eb8c1b8dc43 100644
--- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
@@ -137,7 +137,6 @@ class SecurityMiddleware extends Middleware {
* @suppress PhanUndeclaredClassConstant
*/
public function beforeController($controller, $methodName) {
-
// this will set the current navigation entry of the app, use this only
// for normal HTML requests and not for AJAX requests
$this->navigationManager->setActiveEntry($this->appName);
@@ -207,11 +206,11 @@ class SecurityMiddleware extends Middleware {
* This allows oauth apps (e.g. moodle) to use the OCS endpoints
*/
if (!$this->request->passesCSRFCheck() && !(
- $controller instanceof OCSController && (
- $this->request->getHeader('OCS-APIREQUEST') === 'true' ||
- strpos($this->request->getHeader('Authorization'), 'Bearer ') === 0
- )
- )) {
+ $controller instanceof OCSController && (
+ $this->request->getHeader('OCS-APIREQUEST') === 'true' ||
+ strpos($this->request->getHeader('Authorization'), 'Bearer ') === 0
+ )
+ )) {
throw new CrossSiteRequestForgeryException();
}
}
diff --git a/lib/private/AppFramework/Middleware/SessionMiddleware.php b/lib/private/AppFramework/Middleware/SessionMiddleware.php
index 32ac2b17ae5..af195df0de9 100644
--- a/lib/private/AppFramework/Middleware/SessionMiddleware.php
+++ b/lib/private/AppFramework/Middleware/SessionMiddleware.php
@@ -32,7 +32,6 @@ use OCP\AppFramework\Middleware;
use OCP\ISession;
class SessionMiddleware extends Middleware {
-
/** @var ControllerMethodReflector */
private $reflector;
diff --git a/lib/private/AppFramework/Routing/RouteConfig.php b/lib/private/AppFramework/Routing/RouteConfig.php
index 3986abd6d6e..6e3e49e8d99 100644
--- a/lib/private/AppFramework/Routing/RouteConfig.php
+++ b/lib/private/AppFramework/Routing/RouteConfig.php
@@ -79,7 +79,6 @@ class RouteConfig {
* The routes and resource will be registered to the \OCP\Route\IRouter
*/
public function register() {
-
// parse simple
$this->processIndexRoutes($this->routes);
diff --git a/lib/private/AppFramework/ScopedPsrLogger.php b/lib/private/AppFramework/ScopedPsrLogger.php
index 46832c6d38d..4ed91cdb6c0 100644
--- a/lib/private/AppFramework/ScopedPsrLogger.php
+++ b/lib/private/AppFramework/ScopedPsrLogger.php
@@ -30,7 +30,6 @@ use Psr\Log\LoggerInterface;
use function array_merge;
class ScopedPsrLogger implements LoggerInterface {
-
/** @var LoggerInterface */
private $inner;
diff --git a/lib/private/AppFramework/Services/AppConfig.php b/lib/private/AppFramework/Services/AppConfig.php
index 355a4123987..1fc07bc22b0 100644
--- a/lib/private/AppFramework/Services/AppConfig.php
+++ b/lib/private/AppFramework/Services/AppConfig.php
@@ -30,7 +30,6 @@ use OCP\AppFramework\Services\IAppConfig;
use OCP\IConfig;
class AppConfig implements IAppConfig {
-
/** @var IConfig */
private $config;
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index 925ef67de64..06e9d4a3ec7 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -45,7 +45,6 @@ use function class_exists;
* SimpleContainer is a simple implementation of a container on basis of Pimple
*/
class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
-
/** @var Container */
private $container;
diff --git a/lib/private/AppFramework/Utility/TimeFactory.php b/lib/private/AppFramework/Utility/TimeFactory.php
index d4fe451a995..27117ed3cfc 100644
--- a/lib/private/AppFramework/Utility/TimeFactory.php
+++ b/lib/private/AppFramework/Utility/TimeFactory.php
@@ -33,8 +33,6 @@ use OCP\AppFramework\Utility\ITimeFactory;
* Needed to mock calls to time()
*/
class TimeFactory implements ITimeFactory {
-
-
/**
* @return int the result of a call to time()
*/