diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-05-13 12:59:51 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-05-20 17:14:58 +0200 |
commit | 9ec0cb0a90ecdc7f4181ce8399bfe0c3a35842a2 (patch) | |
tree | f7e566b31eaa96a1834881043a939eaae45e4495 /build | |
parent | eb45a6ca404524bad6416ba3b3a755f9faa5e9b8 (diff) | |
download | nextcloud-server-9ec0cb0a90ecdc7f4181ce8399bfe0c3a35842a2.tar.gz nextcloud-server-9ec0cb0a90ecdc7f4181ce8399bfe0c3a35842a2.zip |
Fix psalm issues related to the user backend
- Reflect the actual return value returned by the implementation in the
the interface. E.g. IUser|bool -> IUser|false
- Remove $hasLoggedIn parameter from private countUser implementation.
Replace the two call with the equivalent countSeenUser
- getBackend is nuallable, add this to the interface
- Use backend interface to make psalm happy about call to undefined
methods. Also helps with getting rid at some point of the old
implementActions
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'build')
-rw-r--r-- | build/psalm-baseline.xml | 61 |
1 files changed, 3 insertions, 58 deletions
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index b2953298fa9..21da75d5608 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -2310,11 +2310,6 @@ <code>searchCollections</code> </UndefinedInterfaceMethod> </file> - <file src="core/Controller/SvgController.php"> - <TypeDoesNotContainNull occurrences="1"> - <code>$svg === null</code> - </TypeDoesNotContainNull> - </file> <file src="core/Controller/UnifiedSearchController.php"> <NullArgument occurrences="1"> <code>null</code> @@ -4354,28 +4349,11 @@ <FalsableReturnStatement occurrences="1"> <code>false</code> </FalsableReturnStatement> - <ImplicitToStringCast occurrences="1"> - <code>$query->func()->lower('displayname')</code> - </ImplicitToStringCast> </file> <file src="lib/private/User/Manager.php"> - <ImplementedReturnTypeMismatch occurrences="1"> - <code>array|int</code> - </ImplementedReturnTypeMismatch> - <InvalidArgument occurrences="1"> - <code>$callback</code> - </InvalidArgument> - <InvalidNullableReturnType occurrences="1"> - <code>bool|IUser</code> - </InvalidNullableReturnType> - <NullableReturnStatement occurrences="2"> - <code>$this->createUserFromBackend($uid, $password, $backend)</code> - <code>$this->createUserFromBackend($uid, $password, $backend)</code> - </NullableReturnStatement> - <UndefinedInterfaceMethod occurrences="5"> - <code>checkPassword</code> - <code>checkPassword</code> - <code>countUsers</code> + <ImplementedReturnTypeMismatch occurrences="1"/> + <InvalidArgument occurrences="1"/> + <UndefinedInterfaceMethod occurrences="2"> <code>createUser</code> <code>getUsersForUserValueCaseInsensitive</code> </UndefinedInterfaceMethod> @@ -4387,23 +4365,13 @@ <InvalidArgument occurrences="1"> <code>IUser::class . '::firstLogin'</code> </InvalidArgument> - <InvalidScalarArgument occurrences="2"> - <code>$this->timeFactory->getTime()</code> - <code>$this->timeFactory->getTime()</code> - </InvalidScalarArgument> <NoInterfaceProperties occurrences="2"> <code>$request->server</code> <code>$request->server</code> </NoInterfaceProperties> - <NullableReturnStatement occurrences="1"> - <code>null</code> - </NullableReturnStatement> <TooManyArguments occurrences="1"> <code>dispatch</code> </TooManyArguments> - <UndefinedMethod occurrences="1"> - <code>getByEmail</code> - </UndefinedMethod> </file> <file src="lib/private/User/User.php"> <InvalidArgument occurrences="5"> @@ -4413,22 +4381,6 @@ <code>IUser::class . '::preDelete'</code> <code>IUser::class . '::preSetPassword'</code> </InvalidArgument> - <InvalidNullableReturnType occurrences="1"> - <code>getBackend</code> - </InvalidNullableReturnType> - <InvalidReturnStatement occurrences="1"> - <code>$image</code> - </InvalidReturnStatement> - <InvalidReturnType occurrences="1"> - <code>IImage|null</code> - </InvalidReturnType> - <InvalidScalarArgument occurrences="2"> - <code>$quota</code> - <code>$this->lastLogin</code> - </InvalidScalarArgument> - <NullableReturnStatement occurrences="1"> - <code>$this->backend</code> - </NullableReturnStatement> <TooManyArguments occurrences="5"> <code>dispatch</code> <code>dispatch</code> @@ -4436,13 +4388,6 @@ <code>dispatch</code> <code>dispatch</code> </TooManyArguments> - <UndefinedInterfaceMethod occurrences="5"> - <code>canChangeAvatar</code> - <code>deleteUserAvatar</code> - <code>getHome</code> - <code>setDisplayName</code> - <code>setPassword</code> - </UndefinedInterfaceMethod> </file> <file src="lib/private/legacy/OC_API.php"> <InvalidNullableReturnType occurrences="1"> |