aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r--lib/private/AppFramework/App.php2
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php4
-rw-r--r--lib/private/AppFramework/Http/Dispatcher.php10
-rw-r--r--lib/private/AppFramework/Http/Request.php30
-rw-r--r--lib/private/AppFramework/Middleware/MiddlewareDispatcher.php8
-rw-r--r--lib/private/AppFramework/Middleware/Security/CORSMiddleware.php2
-rw-r--r--lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php2
-rw-r--r--lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php4
-rw-r--r--lib/private/AppFramework/Utility/ControllerMethodReflector.php4
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php2
10 files changed, 34 insertions, 34 deletions
diff --git a/lib/private/AppFramework/App.php b/lib/private/AppFramework/App.php
index 9f9fb32dbcb..c5f61d7e938 100644
--- a/lib/private/AppFramework/App.php
+++ b/lib/private/AppFramework/App.php
@@ -37,7 +37,7 @@ class App {
* namespace tag or uppercasing the appid's first letter
* @param string $appId the app id
* @param string $topNamespace the namespace which should be prepended to
- * the transformed app id, defaults to OCA\
+ * the transformed app id, defaults to OCA\
* @return string the starting namespace for the app
*/
public static function buildAppNamespace(string $appId, string $topNamespace = 'OCA\\'): string {
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index f59d5b55706..d7a380f9e1d 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -538,10 +538,10 @@ class RegistrationContext {
public function registerTalkBackend(string $appId, string $backend) {
// Some safeguards for invalid registrations
if ($appId !== 'spreed') {
- throw new RuntimeException("Only the Talk app is allowed to register a Talk backend");
+ throw new RuntimeException('Only the Talk app is allowed to register a Talk backend');
}
if ($this->talkBackendRegistration !== null) {
- throw new RuntimeException("There can only be one Talk backend");
+ throw new RuntimeException('There can only be one Talk backend');
}
$this->talkBackendRegistration = new ServiceRegistration($appId, $backend);
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php
index bbb68972a41..b7952df8d19 100644
--- a/lib/private/AppFramework/Http/Dispatcher.php
+++ b/lib/private/AppFramework/Http/Dispatcher.php
@@ -55,9 +55,9 @@ class Dispatcher {
/**
* @param Http $protocol the http protocol with contains all status headers
* @param MiddlewareDispatcher $middlewareDispatcher the dispatcher which
- * runs the middleware
+ * runs the middleware
* @param ControllerMethodReflector $reflector the reflector that is used to inject
- * the arguments for the controller
+ * the arguments for the controller
* @param IRequest $request the incoming request
* @param IConfig $config
* @param ConnectionAdapter $connection
@@ -89,10 +89,10 @@ class Dispatcher {
* Handles a request and calls the dispatcher on the controller
* @param Controller $controller the controller which will be called
* @param string $methodName the method name which will be called on
- * the controller
+ * the controller
* @return array $array[0] contains a string with the http main header,
- * $array[1] contains headers in the form: $key => value, $array[2] contains
- * the response output
+ * $array[1] contains headers in the form: $key => value, $array[2] contains
+ * the response output
* @throws \Exception
*/
public function dispatch(Controller $controller, string $methodName): array {
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index c877304c929..4bbeabb7aae 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -67,15 +67,15 @@ class Request implements \ArrayAccess, \Countable, IRequest {
/**
* @param array $vars An associative array with the following optional values:
- * - array 'urlParams' the parameters which were matched from the URL
- * - array 'get' the $_GET array
- * - array|string 'post' the $_POST array or JSON string
- * - array 'files' the $_FILES array
- * - array 'server' the $_SERVER array
- * - array 'env' the $_ENV array
- * - array 'cookies' the $_COOKIE array
- * - string 'method' the request method (GET, POST etc)
- * - string|false 'requesttoken' the requesttoken or false when not available
+ * - array 'urlParams' the parameters which were matched from the URL
+ * - array 'get' the $_GET array
+ * - array|string 'post' the $_POST array or JSON string
+ * - array 'files' the $_FILES array
+ * - array 'server' the $_SERVER array
+ * - array 'env' the $_ENV array
+ * - array 'cookies' the $_COOKIE array
+ * - string 'method' the request method (GET, POST etc)
+ * - string|false 'requesttoken' the requesttoken or false when not available
* @param IRequestId $requestId
* @param IConfig $config
* @param CsrfTokenManager|null $csrfTokenManager
@@ -284,11 +284,11 @@ class Request implements \ArrayAccess, \Countable, IRequest {
* 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
+ * 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
*/
@@ -837,7 +837,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
* Returns the overwritehost setting from the config if set and
* if the overwrite condition is met
* @return string|null overwritehost value or null if not defined or the defined condition
- * isn't met
+ * isn't met
*/
private function getOverwriteHost() {
if ($this->config->getSystemValueString('overwritehost') !== '' && $this->isOverwriteCondition()) {
diff --git a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
index 2b5acc8b75f..c9b51f26f34 100644
--- a/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
+++ b/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php
@@ -23,7 +23,7 @@ class MiddlewareDispatcher {
/**
* @var int counter which tells us what middleware was executed once an
- * exception occurs
+ * exception occurs
*/
private int $middlewareCounter;
@@ -84,10 +84,10 @@ class MiddlewareDispatcher {
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
- * the controller
+ * the controller
* @param \Exception $exception the thrown exception
* @return Response a Response object if the middleware can handle the
- * exception
+ * exception
* @throws \Exception the passed in exception if it can't handle it
*/
public function afterException(Controller $controller, string $methodName, \Exception $exception): Response {
@@ -109,7 +109,7 @@ class MiddlewareDispatcher {
*
* @param Controller $controller the controller that is being called
* @param string $methodName the name of the method that will be called on
- * the controller
+ * the controller
* @param Response $response the generated response from the controller
* @return Response a Response object
*/
diff --git a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
index 3f0755b1b91..10c8f8c7aee 100644
--- a/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php
@@ -31,7 +31,7 @@ use ReflectionMethod;
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
*/
class CORSMiddleware extends Middleware {
- /** @var IRequest */
+ /** @var IRequest */
private $request;
/** @var ControllerMethodReflector */
private $reflector;
diff --git a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
index a983de23597..34933e13ecd 100644
--- a/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php
@@ -93,7 +93,7 @@ class PasswordConfirmationMiddleware extends Middleware {
return;
}
- $lastConfirm = (int) $this->session->get('last-password-confirm');
+ $lastConfirm = (int)$this->session->get('last-password-confirm');
// TODO: confirm excludedUserBackEnds can go away and remove it
if (!isset($this->excludedUserBackEnds[$backendClassName]) && $lastConfirm < ($this->timeFactory->getTime() - (30 * 60 + 15))) { // allow 15 seconds delay
throw new NotConfirmedException();
diff --git a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php
index 511ee3fc28a..f4d120ebc30 100644
--- a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php
@@ -112,8 +112,8 @@ class RateLimitingMiddleware extends Middleware {
if ($annotationLimit !== '' && $annotationPeriod !== '') {
return new $attributeClass(
- (int) $annotationLimit,
- (int) $annotationPeriod,
+ (int)$annotationLimit,
+ (int)$annotationPeriod,
);
}
diff --git a/lib/private/AppFramework/Utility/ControllerMethodReflector.php b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
index 9c08f58b384..2031327dfae 100644
--- a/lib/private/AppFramework/Utility/ControllerMethodReflector.php
+++ b/lib/private/AppFramework/Utility/ControllerMethodReflector.php
@@ -82,9 +82,9 @@ class ControllerMethodReflector implements IControllerMethodReflector {
/**
* Inspects the PHPDoc parameters for types
* @param string $parameter the parameter whose type comments should be
- * parsed
+ * parsed
* @return string|null type in the type parameters (@param int $something)
- * would return int or null if not existing
+ * would return int or null if not existing
*/
public function getType(string $parameter) {
if (array_key_exists($parameter, $this->types)) {
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index bf0ef36d13c..56de4a34cf6 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -89,7 +89,7 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
}
// don't lose the error we got while trying to query by type
- throw new QueryException($e->getMessage(), (int) $e->getCode(), $e);
+ throw new QueryException($e->getMessage(), (int)$e->getCode(), $e);
}
}