From 7bb7f4d936abc26495991aa8df9aab3825760165 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 2 Mar 2021 14:23:27 +0100 Subject: [PATCH 1/3] Update psalm baseline Signed-off-by: Roeland Jago Douma --- build/psalm-baseline.xml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 1e0c40d7d2..51f0335415 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -761,8 +761,6 @@ string[] - null - $this->circleToPrincipal($name) null null null @@ -1230,7 +1228,6 @@ bool bool bool - bool @@ -2327,10 +2324,6 @@ (int)$cacheBusterKey+1 - - null - null - @@ -2425,8 +2418,7 @@ string[] - - [$attr => $result['values']] + $key $key $e->getCode() @@ -2450,9 +2442,6 @@ !is_null($attr) && !is_array($attr) isset($ldapRecord[$this->connection->$uuidAttr]) - - $uidsByDn - @@ -2481,8 +2470,7 @@ - - 'dn' + $this->cachedGroupsByMember[$uid] @@ -3104,7 +3092,7 @@ - $this + $this->create('core_ajax_update', '/core/ajax/update.php') $this @@ -4772,14 +4760,6 @@ true - - - $position - - - offsetGet - - false @@ -5514,7 +5494,6 @@ $data - $this->shareApiLinkDefaultExpireDays() $this->shareApiLinkDefaultExpireDays() $id From f80f7a33e8c5e2dcb9678cb1d6b650e797af871a Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 17 Mar 2021 10:06:53 +0100 Subject: [PATCH 2/3] Fix baseline further Signed-off-by: Vincent Petry --- build/psalm-baseline.xml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 51f0335415..496ab06f4d 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -3092,7 +3092,6 @@ - $this->create('core_ajax_update', '/core/ajax/update.php') $this @@ -3648,9 +3647,6 @@ - - IAddressBook[] - bool array @@ -6072,11 +6068,6 @@ $jobList - - - IAddressBook[] - - WidgetSetting From 67e0b194b62fcefdc1f71e85539edd093a439f8a Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 17 Mar 2021 12:01:19 +0100 Subject: [PATCH 3/3] Update and fix baseline Backported some bits of stable21 to make Psalm happy. Signed-off-by: Vincent Petry --- apps/encryption/lib/Crypto/Crypt.php | 2 +- apps/encryption/lib/Crypto/Encryption.php | 2 +- build/psalm-baseline.xml | 14 ++++++++++---- lib/public/Encryption/IEncryptionModule.php | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php index 6559deb940..57aecf9563 100644 --- a/apps/encryption/lib/Crypto/Crypt.php +++ b/apps/encryption/lib/Crypto/Crypt.php @@ -459,7 +459,7 @@ class Crypt { * @param string $passPhrase * @param string $cipher * @param int $version - * @param int $position + * @param int|string $position * @return string * @throws DecryptionFailedException */ diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index 263e9a15df..6fa388e887 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -360,7 +360,7 @@ class Encryption implements IEncryptionModule { * decrypt data * * @param string $data you want to decrypt - * @param int $position + * @param int|string $position * @return string decrypted data * @throws DecryptionFailedException */ diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 496ab06f4d..00a92a932d 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -1130,7 +1130,7 @@ $result - + $position $position $position @@ -2418,10 +2418,11 @@ string[] - - $key - $key + $e->getCode() + $key + $key + [$attr => $result['values']] $cookie @@ -6014,6 +6015,11 @@ 'DateTimeFormatter' + + + $cacheEntry + + $this->request->server diff --git a/lib/public/Encryption/IEncryptionModule.php b/lib/public/Encryption/IEncryptionModule.php index 7d306d3c2f..050cdf2555 100644 --- a/lib/public/Encryption/IEncryptionModule.php +++ b/lib/public/Encryption/IEncryptionModule.php @@ -102,7 +102,7 @@ interface IEncryptionModule { * decrypt data * * @param string $data you want to decrypt - * @param string $position position of the block we want to decrypt + * @param int|string $position position of the block we want to decrypt * * @return mixed decrypted data *