summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-11-21 10:56:15 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-11-21 10:56:15 +0100
commit378630f8a092c9148d802b9662358346af2cef0f (patch)
treed7e534f025ade40eed88e0bf1295f4974f7cf8f4
parent9983af0cc056e7f2433523af76360bfe1acbfcf4 (diff)
downloadnextcloud-server-378630f8a092c9148d802b9662358346af2cef0f.tar.gz
nextcloud-server-378630f8a092c9148d802b9662358346af2cef0f.zip
Fix psalm issues following doctrine/dbal bump
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/DB/Connection.php7
-rw-r--r--lib/private/DB/Migrator.php2
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php
index 73e0f4b4ac2..3173a65d875 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -124,6 +124,7 @@ class Connection extends \Doctrine\DBAL\Connection {
public function connect() {
try {
if ($this->_conn) {
+ /** @psalm-suppress InternalMethod */
return parent::connect();
}
@@ -291,7 +292,7 @@ class Connection extends \Doctrine\DBAL\Connection {
$sql = $this->adapter->fixupStatement($sql);
$this->queriesExecuted++;
$this->logQueryToFile($sql);
- return parent::executeStatement($sql, $params, $types);
+ return (int)parent::executeStatement($sql, $params, $types);
}
protected function logQueryToFile(string $sql): void {
@@ -390,7 +391,7 @@ class Connection extends \Doctrine\DBAL\Connection {
return $insertQb->createNamedParameter($value, $this->getType($value));
}, array_merge($keys, $values))
);
- return $insertQb->execute();
+ return $insertQb->executeStatement();
} catch (NotNullConstraintViolationException $e) {
throw $e;
} catch (ConstraintViolationException $e) {
@@ -416,7 +417,7 @@ class Connection extends \Doctrine\DBAL\Connection {
}
}
$updateQb->where($where);
- $affected = $updateQb->execute();
+ $affected = $updateQb->executeStatement();
if ($affected === 0 && !empty($updatePreconditionValues)) {
throw new PreConditionNotMetException();
diff --git a/lib/private/DB/Migrator.php b/lib/private/DB/Migrator.php
index 5dc07be1d2b..97d91e1c100 100644
--- a/lib/private/DB/Migrator.php
+++ b/lib/private/DB/Migrator.php
@@ -41,7 +41,6 @@ use function preg_match;
use OCP\EventDispatcher\IEventDispatcher;
class Migrator {
-
/** @var Connection */
protected $connection;
@@ -138,6 +137,7 @@ class Migrator {
}
}
+ /** @psalm-suppress InternalMethod */
$comparator = new Comparator();
return $comparator->compare($sourceSchema, $targetSchema);
}