diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-06 18:57:32 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-01-12 22:03:06 +0300 |
commit | aeecb72e96e54439f98822467bb727366207039f (patch) | |
tree | b77aee20add8d099a271131e0b4b0986426e5df1 /build/psalm-baseline.xml | |
parent | 47c9c34cca22602fb609de6c0e1d32ec17a9e7fe (diff) |
Fix a few psalm issues and moved back to psalm/phar 4.18
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'build/psalm-baseline.xml')
-rw-r--r-- | build/psalm-baseline.xml | 279 |
1 files changed, 234 insertions, 45 deletions
diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 4f78db386e3..9d4ef09a30b 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<files psalm-version="4.17.0@6f4707aa41c9174353a6434bba3fc8840f981d9c"> +<files psalm-version="4.18.1@dda05fa913f4dc6eb3386f2f7ce5a45d37a71bcb"> <file src="3rdparty/sabre/dav/lib/CalDAV/Calendar.php"> <MoreSpecificImplementedParamType occurrences="1"> <code>$calendarData</code> @@ -36,6 +36,11 @@ <code>array</code> </LessSpecificImplementedReturnType> </file> + <file src="apps/admin_audit/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="1"> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/cloud_federation_api/lib/Controller/RequestHandlerController.php"> <InvalidScalarArgument occurrences="1"> <code>$e->getCode()</code> @@ -44,6 +49,12 @@ <code>!is_array($notification)</code> </TypeDoesNotContainType> </file> + <file src="apps/comments/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="2"> + <code>registerEventListener</code> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/comments/lib/Search/Result.php"> <InvalidScalarArgument occurrences="1"> <code>(int) $comment->getId()</code> @@ -54,6 +65,11 @@ <code>\Sabre\Uri\split($this->principalUri)</code> </UndefinedFunction> </file> + <file src="apps/contactsinteraction/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="1"> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/dav/appinfo/v1/caldav.php"> <TooManyArguments occurrences="1"> <code>new \Sabre\DAV\Auth\Plugin($authBackend, 'ownCloud')</code> @@ -112,6 +128,36 @@ </MissingFile> </file> <file src="apps/dav/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="28"> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + </InvalidArgument> <UndefinedInterfaceMethod occurrences="1"> <code>getAppDataDir</code> </UndefinedInterfaceMethod> @@ -314,6 +360,11 @@ <code>@var VEvent $vevent</code> </PossiblyInvalidDocblockTag> </file> + <file src="apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php"> + <UndefinedConstant occurrences="1"> + <code>$provider::NOTIFICATION_TYPE</code> + </UndefinedConstant> + </file> <file src="apps/dav/lib/CalDAV/Reminder/Notifier.php"> <FalsableReturnStatement occurrences="4"> <code>$this->l10n->l('date', $dt, ['width' => 'medium'])</code> @@ -1005,6 +1056,9 @@ <InvalidReturnType occurrences="1"> <code>array</code> </InvalidReturnType> + <RedundantFunctionCall occurrences="1"> + <code>array_values</code> + </RedundantFunctionCall> </file> <file src="apps/dav/lib/Upload/UploadHome.php"> <UndefinedFunction occurrences="1"> @@ -1022,7 +1076,8 @@ </InvalidOperand> </file> <file src="apps/encryption/lib/Crypto/Crypt.php"> - <RedundantCondition occurrences="1"> + <RedundantCondition occurrences="2"> + <code>$userSession</code> <code>$userSession</code> </RedundantCondition> <TypeDoesNotContainType occurrences="2"> @@ -1058,9 +1113,6 @@ <InvalidThrow occurrences="1"> <code>throw $exception;</code> </InvalidThrow> - <RedundantCondition occurrences="1"> - <code>$userSession</code> - </RedundantCondition> </file> <file src="apps/encryption/lib/Recovery.php"> <InvalidScalarArgument occurrences="3"> @@ -1068,9 +1120,6 @@ <code>0</code> <code>1</code> </InvalidScalarArgument> - <RedundantCondition occurrences="1"> - <code>$userSession</code> - </RedundantCondition> </file> <file src="apps/encryption/lib/Session.php"> <TooManyArguments occurrences="1"> @@ -1078,10 +1127,16 @@ </TooManyArguments> </file> <file src="apps/encryption/lib/Util.php"> - <RedundantCondition occurrences="1"> + <RedundantCondition occurrences="2"> + <code>$userSession</code> <code>$userSession</code> </RedundantCondition> </file> + <file src="apps/federatedfilesharing/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="1"> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/federatedfilesharing/lib/Controller/RequestHandlerController.php"> <InvalidScalarArgument occurrences="7"> <code>$id</code> @@ -1136,6 +1191,11 @@ <code>null</code> </NullableReturnStatement> </file> + <file src="apps/federation/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="1"> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/federation/lib/TrustedServers.php"> <InvalidArgument occurrences="1"> <code>'OCP\Federation\TrustedServerEvent::remove'</code> @@ -1180,6 +1240,12 @@ <code>10 * 1024 * 1024</code> </InvalidScalarArgument> </file> + <file src="apps/files/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="2"> + <code>registerEventListener</code> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/files/lib/Command/Scan.php"> <NullArgument occurrences="1"> <code>null</code> @@ -1269,6 +1335,12 @@ <code>$this</code> </InvalidScope> </file> + <file src="apps/files_external/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="2"> + <code>registerEventListener</code> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/files_external/lib/Command/Delete.php"> <NullArgument occurrences="1"> <code>null</code> @@ -1318,6 +1390,12 @@ <code>getUniqueStorages</code> </UndefinedMethod> </file> + <file src="apps/files_external/lib/Lib/Auth/Password/LoginCredentials.php"> + <InvalidArgument occurrences="2"> + <code>addServiceListener</code> + <code>addServiceListener</code> + </InvalidArgument> + </file> <file src="apps/files_external/lib/Lib/Backend/Backend.php"> <InvalidReturnType occurrences="1"> <code>self</code> @@ -1506,6 +1584,16 @@ <code>$_</code> </UndefinedVariable> </file> + <file src="apps/files_sharing/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="6"> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + </InvalidArgument> + </file> <file src="apps/files_sharing/lib/Cache.php"> <FalsableReturnStatement occurrences="1"> <code>false</code> @@ -1525,11 +1613,17 @@ </UndefinedInterfaceMethod> </file> <file src="apps/files_sharing/lib/Controller/ShareAPIController.php"> + <InvalidOperand occurrences="1"> + <code>$permissions</code> + </InvalidOperand> <InvalidScalarArgument occurrences="3"> <code>$code</code> <code>$code</code> <code>Constants::PERMISSION_ALL</code> </InvalidScalarArgument> + <RedundantCondition occurrences="1"> + <code>$permissions & Constants::PERMISSION_READ</code> + </RedundantCondition> <UndefinedClass occurrences="2"> <code>\OCA\Circles\Api\v1\Circles</code> <code>\OCA\Circles\Api\v1\Circles</code> @@ -1597,6 +1691,11 @@ <code>$exception->getMessage()</code> </InvalidArgument> </file> + <file src="apps/files_sharing/lib/MountProvider.php"> + <RedundantFunctionCall occurrences="1"> + <code>array_values</code> + </RedundantFunctionCall> + </file> <file src="apps/files_sharing/lib/ShareBackend/File.php"> <InvalidScalarArgument occurrences="2"> <code>$itemSource</code> @@ -1709,9 +1808,13 @@ </TooManyArguments> </file> <file src="apps/files_trashbin/lib/Trash/LegacyTrashBackend.php"> - <RedundantCondition occurrences="1"> + <RedundantCondition occurrences="2"> + <code>$trashFiles</code> <code>$trashFiles</code> </RedundantCondition> + <TypeDoesNotContainType occurrences="1"> + <code>null</code> + </TypeDoesNotContainType> <UndefinedInterfaceMethod occurrences="2"> <code>$file</code> <code>getById</code> @@ -1735,6 +1838,12 @@ <code>$this</code> </InvalidScope> </file> + <file src="apps/files_versions/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="2"> + <code>registerEventListener</code> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/files_versions/lib/Sabre/RestoreFolder.php"> <InvalidNullableReturnType occurrences="1"> <code>getChild</code> @@ -1778,6 +1887,11 @@ <file src="apps/oauth2/lib/Db/ClientMapper.php"> <InvalidCatch occurrences="2"/> </file> + <file src="apps/provisioning_api/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="1"> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/provisioning_api/lib/Controller/UsersController.php"> <InvalidScalarArgument occurrences="1"> <code>$quota</code> @@ -1788,6 +1902,11 @@ </TypeDoesNotContainNull> </file> <file src="apps/settings/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="3"> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + </InvalidArgument> <InvalidScalarArgument occurrences="1"> <code>\OC_User::getUser()</code> </InvalidScalarArgument> @@ -1829,6 +1948,11 @@ <code>isReady</code> </UndefinedInterfaceMethod> </file> + <file src="apps/settings/lib/Settings/Admin/Server.php"> + <InvalidArgument occurrences="1"> + <code>false</code> + </InvalidArgument> + </file> <file src="apps/settings/lib/Settings/Admin/Sharing.php"> <InvalidScalarArgument occurrences="1"> <code>Constants::PERMISSION_ALL</code> @@ -1865,6 +1989,11 @@ <code>$type</code> </InvalidScalarArgument> </file> + <file src="apps/theming/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="1"> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/theming/lib/Controller/IconController.php"> <InvalidReturnStatement occurrences="1"> <code>$response</code> @@ -1905,6 +2034,14 @@ <code>$folder !== null</code> </RedundantCondition> </file> + <file src="apps/twofactor_backupcodes/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="4"> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/twofactor_backupcodes/lib/BackgroundJob/RememberBackupCodesJob.php"> <InvalidArgument occurrences="1"> <code>bool</code> @@ -1922,6 +2059,9 @@ </InvalidScalarArgument> </file> <file src="apps/updatenotification/lib/Notification/BackgroundJob.php"> + <InvalidArgument occurrences="1"> + <code>false</code> + </InvalidArgument> <InvalidPropertyAssignmentValue occurrences="1"> <code>$this->users</code> </InvalidPropertyAssignmentValue> @@ -2122,7 +2262,6 @@ </InvalidPropertyAssignmentValue> <InvalidReturnType occurrences="1"> <code>null</code> - <code>null</code> </InvalidReturnType> <InvalidScalarArgument occurrences="3"> <code>$this->getHomePath($ldapEntry[$attr][0])</code> @@ -2181,10 +2320,20 @@ </TypeDoesNotContainType> </file> <file src="apps/user_status/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="3"> + <code>registerEventListener</code> + <code>registerEventListener</code> + <code>registerEventListener</code> + </InvalidArgument> <UndefinedInterfaceMethod occurrences="1"> <code>registerProvider</code> </UndefinedInterfaceMethod> </file> + <file src="apps/workflowengine/lib/AppInfo/Application.php"> + <InvalidArgument occurrences="1"> + <code>registerEventListener</code> + </InvalidArgument> + </file> <file src="apps/workflowengine/lib/Check/AbstractStringCheck.php"> <NullArgument occurrences="1"> <code>null</code> @@ -2279,6 +2428,19 @@ <code>isUserScopeEnabled</code> </UndefinedInterfaceMethod> </file> + <file src="core/Application.php"> + <InvalidArgument occurrences="9"> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + <code>addServiceListener</code> + </InvalidArgument> + </file> <file src="core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php"> <ParamNameMismatch occurrences="1"> <code>$arguments</code> @@ -2294,14 +2456,6 @@ <code>$arguments</code> </ParamNameMismatch> </file> - <file src="core/Command/App/GetPath.php"> - <ImplementedReturnTypeMismatch occurrences="1"> - <code>null|int</code> - </ImplementedReturnTypeMismatch> - <MismatchingDocblockReturnType occurrences="1"> - <code>null|int</code> - </MismatchingDocblockReturnType> - </file> <file src="core/Command/App/Install.php"> <TypeDoesNotContainType occurrences="1"> <code>$result === false</code> @@ -2312,14 +2466,6 @@ <code>array</code> </LessSpecificImplementedReturnType> </file> - <file src="core/Command/Config/App/GetConfig.php"> - <ImplementedReturnTypeMismatch occurrences="1"> - <code>null|int</code> - </ImplementedReturnTypeMismatch> - <MismatchingDocblockReturnType occurrences="1"> - <code>null|int</code> - </MismatchingDocblockReturnType> - </file> <file src="core/Command/Config/Import.php"> <InvalidScalarArgument occurrences="2"> <code>0</code> @@ -2334,14 +2480,6 @@ <code>getFilteredValues</code> </TooManyArguments> </file> - <file src="core/Command/Config/System/GetConfig.php"> - <ImplementedReturnTypeMismatch occurrences="1"> - <code>null|int</code> - </ImplementedReturnTypeMismatch> - <MismatchingDocblockReturnType occurrences="1"> - <code>null|int</code> - </MismatchingDocblockReturnType> - </file> <file src="core/Command/Db/AddMissingColumns.php"> <InvalidArgument occurrences="1"> <code>IDBConnection::ADD_MISSING_COLUMNS_EVENT</code> @@ -2497,13 +2635,19 @@ <code>$this</code> </InvalidScope> </file> + <file src="core/templates/layout.guest.php"> + <InvalidArgument occurrences="1"> + <code>false</code> + </InvalidArgument> + </file> <file src="core/templates/layout.public.php"> <UndefinedInterfaceMethod occurrences="1"> <code>getIcon</code> </UndefinedInterfaceMethod> </file> <file src="lib/autoloader.php"> - <RedundantCondition occurrences="1"> + <RedundantCondition occurrences="2"> + <code>$this->memoryCache</code> <code>$this->memoryCache</code> </RedundantCondition> </file> @@ -2512,8 +2656,10 @@ <code>getAppsNeedingUpgrade</code> <code>getIncompatibleApps</code> </InternalMethod> - <InvalidArgument occurrences="1"> + <InvalidArgument occurrences="3"> <code>$restrictions</code> + <code>addServiceListener</code> + <code>addServiceListener</code> </InvalidArgument> <RedundantCondition occurrences="1"> <code>((array)$request->getParam('appid')) !== ''</code> @@ -3337,7 +3483,8 @@ <NullableReturnStatement occurrences="1"> <code>null</code> </NullableReturnStatement> - <RedundantCondition occurrences="1"> + <RedundantCondition occurrences="2"> + <code>$userObject</code> <code>$userObject</code> </RedundantCondition> <TooManyArguments occurrences="1"> @@ -3523,6 +3670,9 @@ </MoreSpecificImplementedParamType> </file> <file src="lib/private/Files/ObjectStore/ObjectStoreStorage.php"> + <InvalidScalarArgument occurrences="1"> + <code>$source</code> + </InvalidScalarArgument> <ParamNameMismatch occurrences="2"> <code>$source</code> <code>$target</code> @@ -3726,6 +3876,11 @@ </InvalidReturnType> </file> <file src="lib/private/Files/Storage/Wrapper/Encoding.php"> + <InvalidScalarArgument occurrences="3"> + <code>\Normalizer::FORM_C</code> + <code>\Normalizer::FORM_C</code> + <code>\Normalizer::FORM_D</code> + </InvalidScalarArgument> <UndefinedInterfaceMethod occurrences="13"> <code>$this->namesCache</code> <code>$this->namesCache</code> @@ -3816,6 +3971,11 @@ <code>stream_flush</code> </InvalidReturnType> </file> + <file src="lib/private/Files/Template/TemplateManager.php"> + <RedundantCondition occurrences="1"> + <code>!$isDefaultTemplates</code> + </RedundantCondition> + </file> <file src="lib/private/Files/Type/Detection.php"> <ParamNameMismatch occurrences="1"> <code>$mimetype</code> @@ -3865,9 +4025,11 @@ <code>null</code> <code>null</code> </NullableReturnStatement> - <RedundantCondition occurrences="3"> - <code>$data</code> + <RedundantCondition occurrences="5"> + <code>$result</code> <code>$result && in_array('delete', $hooks) and $result</code> + <code>Constants::PERMISSION_READ</code> + <code>Constants::PERMISSION_READ</code> <code>is_resource($source)</code> </RedundantCondition> <UndefinedDocblockClass occurrences="2"> @@ -3906,7 +4068,10 @@ <MoreSpecificImplementedParamType occurrences="1"> <code>$user</code> </MoreSpecificImplementedParamType> - <RedundantCondition occurrences="3"> + <RedundantCondition occurrences="6"> + <code>$this->emitter</code> + <code>$this->emitter</code> + <code>$this->emitter</code> <code>$this->emitter</code> <code>$this->emitter</code> <code>$this->emitter</code> @@ -3949,6 +4114,10 @@ <FalsableReturnStatement occurrences="1"> <code>false</code> </FalsableReturnStatement> + <InvalidArgument occurrences="2"> + <code>false</code> + <code>false</code> + </InvalidArgument> <InvalidArrayOffset occurrences="2"> <code>$app['path']</code> <code>$app['path']</code> @@ -3956,9 +4125,6 @@ <NullArgument occurrences="1"> <code>null</code> </NullArgument> - <RedundantCondition occurrences="1"> - <code>$archive</code> - </RedundantCondition> </file> <file src="lib/private/IntegrityCheck/Checker.php"> <InvalidArrayAccess occurrences="3"> @@ -4030,7 +4196,8 @@ </InvalidPropertyAssignmentValue> </file> <file src="lib/private/Log.php"> - <RedundantCondition occurrences="1"> + <RedundantCondition occurrences="2"> + <code>$request</code> <code>$request</code> </RedundantCondition> </file> @@ -4203,6 +4370,11 @@ <code>dispatch</code> </TooManyArguments> </file> + <file src="lib/private/Repair/Owncloud/CleanPreviews.php"> + <InvalidArgument occurrences="1"> + <code>false</code> + </InvalidArgument> + </file> <file src="lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php"> <ParamNameMismatch occurrences="1"> <code>$arguments</code> @@ -4212,6 +4384,9 @@ <ParamNameMismatch occurrences="1"> <code>$arguments</code> </ParamNameMismatch> + <TypeDoesNotContainType occurrences="1"> + <code>$counter % 100 === 0</code> + </TypeDoesNotContainType> </file> <file src="lib/private/Repair/RemoveLinkShares.php"> <ImplicitToStringCast occurrences="2"> @@ -4512,6 +4687,14 @@ <code>dispatch</code> </TooManyArguments> </file> + <file src="lib/private/TagManager.php"> + <InvalidNullableReturnType occurrences="1"> + <code>\OCP\ITags</code> + </InvalidNullableReturnType> + <NullableReturnStatement occurrences="1"> + <code>null</code> + </NullableReturnStatement> + </file> <file src="lib/private/Tags.php"> <InvalidArgument occurrences="1"> <code>[$this->user, $this->type, $chunk]</code> @@ -4543,6 +4726,9 @@ </NullArgument> </file> <file src="lib/private/Template/JSResourceLocator.php"> + <InvalidArgument occurrences="1"> + <code>false</code> + </InvalidArgument> <InvalidOperand occurrences="6"> <code>$this->appendIfExist($this->serverroot, $script.'.js')</code> <code>$this->appendIfExist($this->serverroot, $theme_dir.$script.'.js')</code> @@ -4610,6 +4796,9 @@ <ImplementedReturnTypeMismatch occurrences="1"> <code>array|int</code> </ImplementedReturnTypeMismatch> + <InvalidArgument occurrences="1"> + <code>$callback</code> + </InvalidArgument> <InvalidNullableReturnType occurrences="1"> <code>bool|IUser</code> </InvalidNullableReturnType> |