aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework')
-rw-r--r--lib/public/AppFramework/Db/Entity.php2
-rw-r--r--lib/public/AppFramework/Db/QBMapper.php2
-rw-r--r--lib/public/AppFramework/Http/Response.php2
-rw-r--r--lib/public/AppFramework/OCS/OCSBadRequestException.php2
-rw-r--r--lib/public/AppFramework/OCS/OCSForbiddenException.php2
-rw-r--r--lib/public/AppFramework/OCS/OCSNotFoundException.php2
-rw-r--r--lib/public/AppFramework/OCS/OCSPreconditionFailedException.php2
-rw-r--r--lib/public/AppFramework/Utility/ITimeFactory.php2
8 files changed, 8 insertions, 8 deletions
diff --git a/lib/public/AppFramework/Db/Entity.php b/lib/public/AppFramework/Db/Entity.php
index 1ae938f6e32..e0d9eae9171 100644
--- a/lib/public/AppFramework/Db/Entity.php
+++ b/lib/public/AppFramework/Db/Entity.php
@@ -105,7 +105,7 @@ abstract class Entity {
protected function setter(string $name, array $args): void {
// setters should only work for existing attributes
if (property_exists($this, $name)) {
- if ($this->$name === $args[0]) {
+ if ($args[0] === $this->$name) {
return;
}
$this->markFieldUpdated($name);
diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php
index 57b996b2c0f..56957a7c912 100644
--- a/lib/public/AppFramework/Db/QBMapper.php
+++ b/lib/public/AppFramework/Db/QBMapper.php
@@ -59,7 +59,7 @@ abstract class QBMapper {
* mapped to queries without using sql
* @since 14.0.0
*/
- public function __construct(IDBConnection $db, string $tableName, string $entityClass = null) {
+ public function __construct(IDBConnection $db, string $tableName, ?string $entityClass = null) {
$this->db = $db;
$this->tableName = $tableName;
diff --git a/lib/public/AppFramework/Http/Response.php b/lib/public/AppFramework/Http/Response.php
index d28f45f4c60..06541df2da2 100644
--- a/lib/public/AppFramework/Http/Response.php
+++ b/lib/public/AppFramework/Http/Response.php
@@ -141,7 +141,7 @@ class Response {
* @return $this
* @since 8.0.0
*/
- public function addCookie($name, $value, \DateTime $expireDate = null, $sameSite = 'Lax') {
+ public function addCookie($name, $value, ?\DateTime $expireDate = null, $sameSite = 'Lax') {
$this->cookies[$name] = ['value' => $value, 'expireDate' => $expireDate, 'sameSite' => $sameSite];
return $this;
}
diff --git a/lib/public/AppFramework/OCS/OCSBadRequestException.php b/lib/public/AppFramework/OCS/OCSBadRequestException.php
index db146076f2a..997b2fdb025 100644
--- a/lib/public/AppFramework/OCS/OCSBadRequestException.php
+++ b/lib/public/AppFramework/OCS/OCSBadRequestException.php
@@ -38,7 +38,7 @@ class OCSBadRequestException extends OCSException {
* @param Exception|null $previous
* @since 9.1.0
*/
- public function __construct($message = '', Exception $previous = null) {
+ public function __construct($message = '', ?Exception $previous = null) {
parent::__construct($message, Http::STATUS_BAD_REQUEST, $previous);
}
}
diff --git a/lib/public/AppFramework/OCS/OCSForbiddenException.php b/lib/public/AppFramework/OCS/OCSForbiddenException.php
index ecdccb05a6f..691d31996ca 100644
--- a/lib/public/AppFramework/OCS/OCSForbiddenException.php
+++ b/lib/public/AppFramework/OCS/OCSForbiddenException.php
@@ -38,7 +38,7 @@ class OCSForbiddenException extends OCSException {
* @param Exception|null $previous
* @since 9.1.0
*/
- public function __construct($message = '', Exception $previous = null) {
+ public function __construct($message = '', ?Exception $previous = null) {
parent::__construct($message, Http::STATUS_FORBIDDEN, $previous);
}
}
diff --git a/lib/public/AppFramework/OCS/OCSNotFoundException.php b/lib/public/AppFramework/OCS/OCSNotFoundException.php
index 7a2ffb5de91..9dd2925ef11 100644
--- a/lib/public/AppFramework/OCS/OCSNotFoundException.php
+++ b/lib/public/AppFramework/OCS/OCSNotFoundException.php
@@ -38,7 +38,7 @@ class OCSNotFoundException extends OCSException {
* @param Exception|null $previous
* @since 9.1.0
*/
- public function __construct($message = '', Exception $previous = null) {
+ public function __construct($message = '', ?Exception $previous = null) {
parent::__construct($message, Http::STATUS_NOT_FOUND, $previous);
}
}
diff --git a/lib/public/AppFramework/OCS/OCSPreconditionFailedException.php b/lib/public/AppFramework/OCS/OCSPreconditionFailedException.php
index 1b661ed9943..b7064aff318 100644
--- a/lib/public/AppFramework/OCS/OCSPreconditionFailedException.php
+++ b/lib/public/AppFramework/OCS/OCSPreconditionFailedException.php
@@ -38,7 +38,7 @@ class OCSPreconditionFailedException extends OCSException {
* @param Exception|null $previous
* @since 9.1.0
*/
- public function __construct($message = '', Exception $previous = null) {
+ public function __construct($message = '', ?Exception $previous = null) {
parent::__construct($message, Http::STATUS_PRECONDITION_FAILED, $previous);
}
}
diff --git a/lib/public/AppFramework/Utility/ITimeFactory.php b/lib/public/AppFramework/Utility/ITimeFactory.php
index be1b80ff617..ee5901b5a45 100644
--- a/lib/public/AppFramework/Utility/ITimeFactory.php
+++ b/lib/public/AppFramework/Utility/ITimeFactory.php
@@ -50,7 +50,7 @@ interface ITimeFactory extends ClockInterface {
* @return \DateTime
* @since 15.0.0
*/
- public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime;
+ public function getDateTime(string $time = 'now', ?\DateTimeZone $timezone = null): \DateTime;
/**
* @param \DateTimeZone $timezone