diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index f54fbbdd15aa3..f60b18c4c2a73 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -125,7 +125,7 @@ public function __construct(View $view, FileInfo $info, ?IManager $shareManager * different object on a subsequent GET you are strongly recommended to not * return an ETag, and just return null. * - * @param resource $data + * @param resource|string $data * * @throws Forbidden * @throws UnsupportedMediaType diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 1a28785fa1fca..dabb9fd5d08c1 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -244,7 +244,7 @@ protected function analyse(string $sourceUid, $encryptedFiles = []; $this->walkFiles($view, $sourcePath, - function (FileInfo $fileInfo) use ($progress) { + function (FileInfo $fileInfo) use ($progress, &$encryptedFiles) { if ($fileInfo->getType() === FileInfo::TYPE_FOLDER) { // only analyze into folders from main storage, if (!$fileInfo->getStorage()->instanceOfStorage(IHomeStorage::class)) { diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index e6fc5dd3e2241..1430b607519b5 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -513,6 +513,9 @@ public function writeStream(string $path, $stream, ?int $size = null): int { $result = $this->getConnection()->put($this->absPath($path), $stream); fclose($stream); if ($result) { + if ($size === null) { + throw new \Exception("Failed to get written size from sftp storage wrapper"); + } return $size; } else { throw new \Exception("Failed to write steam to sftp storage"); diff --git a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php index c6f5c9802ca8d..a89916f5edbbb 100644 --- a/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php +++ b/apps/settings/lib/SetupChecks/PhpOpcacheSetup.php @@ -102,9 +102,11 @@ protected function getOpcacheSetupRecommendations(): array { $recommendations[] = $this->l10n->t('The OPcache buffer is nearly full. To assure that all scripts can be hold in cache, it is recommended to apply "opcache.memory_consumption" to your PHP configuration with a value higher than "%s".', [($this->iniGetWrapper->getNumeric('opcache.memory_consumption') ?: 'currently')]); } + $interned_strings_buffer = $this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?? 0; + $memory_consumption = $this->iniGetWrapper->getNumeric('opcache.memory_consumption') ?? 0; if ( // Do not recommend to raise the interned strings buffer size above a quarter of the total OPcache size - ($this->iniGetWrapper->getNumeric('opcache.interned_strings_buffer') ?? $this->iniGetWrapper->getNumeric('opcache.memory_consumption') > 0 ?? 0 / 4) && + ($interned_strings_buffer < ($memory_consumption / 4)) && ( empty($status['interned_strings_usage']['free_memory']) || ($status['interned_strings_usage']['used_memory'] / $status['interned_strings_usage']['free_memory'] > 9) diff --git a/apps/theming/lib/Util.php b/apps/theming/lib/Util.php index 71ab0a6dc6cd1..a2f8ee0abad23 100644 --- a/apps/theming/lib/Util.php +++ b/apps/theming/lib/Util.php @@ -218,7 +218,7 @@ public function generateRadioButton($color) { /** - * @param $app string app name + * @param string $app app name * @return string|ISimpleFile path to app icon / file of logo */ public function getAppIcon($app) { @@ -248,8 +248,8 @@ public function getAppIcon($app) { } /** - * @param $app string app name - * @param $image string relative path to image in app folder + * @param string $app app name + * @param string $image relative path to image in app folder * @return string|false absolute path to image */ public function getAppImage($app, $image) { @@ -295,8 +295,8 @@ public function getAppImage($app, $image) { /** * replace default color with a custom one * - * @param $svg string content of a svg file - * @param $color string color to match + * @param string $svg content of a svg file + * @param string $color color to match * @return string */ public function colorizeSvg($svg, $color) { diff --git a/apps/user_ldap/ajax/wizard.php b/apps/user_ldap/ajax/wizard.php index 63241667825a8..676cf77e9904d 100644 --- a/apps/user_ldap/ajax/wizard.php +++ b/apps/user_ldap/ajax/wizard.php @@ -48,7 +48,7 @@ $con = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix, null); $con->setConfiguration($configuration->getConfiguration()); -$con->ldapConfigurationActive = true; +$con->ldapConfigurationActive = (string)true; $con->setIgnoreValidation(true); $factory = \OC::$server->get(\OCA\User_LDAP\AccessFactory::class); diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index b0bb600cb3bec..e0aa095de54f9 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -38,8 +38,76 @@ use Psr\Log\LoggerInterface; /** - * @property int ldapPagingSize holds an integer - * @property string ldapUserAvatarRule + * @property string $ldapHost + * @property string $ldapPort + * @property string $ldapBackupHost + * @property string $ldapBackupPort + * @property string $ldapBackgroundHost + * @property string $ldapBackgroundPort + * @property array|'' $ldapBase + * @property array|'' $ldapBaseUsers + * @property array|'' $ldapBaseGroups + * @property string $ldapAgentName + * @property string $ldapAgentPassword + * @property string $ldapTLS + * @property string $turnOffCertCheck + * @property string $ldapIgnoreNamingRules + * @property string $ldapUserDisplayName + * @property string $ldapUserDisplayName2 + * @property string $ldapUserAvatarRule + * @property string $ldapGidNumber + * @property array|'' $ldapUserFilterObjectclass + * @property array|'' $ldapUserFilterGroups + * @property string $ldapUserFilter + * @property string $ldapUserFilterMode + * @property string $ldapGroupFilter + * @property string $ldapGroupFilterMode + * @property array|'' $ldapGroupFilterObjectclass + * @property array|'' $ldapGroupFilterGroups + * @property string $ldapGroupDisplayName + * @property string $ldapGroupMemberAssocAttr + * @property string $ldapLoginFilter + * @property string $ldapLoginFilterMode + * @property string $ldapLoginFilterEmail + * @property string $ldapLoginFilterUsername + * @property array|'' $ldapLoginFilterAttributes + * @property string $ldapQuotaAttribute + * @property string $ldapQuotaDefault + * @property string $ldapEmailAttribute + * @property string $ldapCacheTTL + * @property string $ldapUuidUserAttribute + * @property string $ldapUuidGroupAttribute + * @property string $ldapOverrideMainServer + * @property string $ldapConfigurationActive + * @property array|'' $ldapAttributesForUserSearch + * @property array|'' $ldapAttributesForGroupSearch + * @property string $ldapExperiencedAdmin + * @property string $homeFolderNamingRule + * @property string $hasMemberOfFilterSupport + * @property string $useMemberOfToDetectMembership + * @property string $ldapExpertUsernameAttr + * @property string $ldapExpertUUIDUserAttr + * @property string $ldapExpertUUIDGroupAttr + * @property string $markRemnantsAsDisabled + * @property string $lastJpegPhotoLookup + * @property string $ldapNestedGroups + * @property string $ldapPagingSize + * @property string $turnOnPasswordChange + * @property string $ldapDynamicGroupMemberURL + * @property string $ldapDefaultPPolicyDN + * @property string $ldapExtStorageHomeAttribute + * @property string $ldapMatchingRuleInChainState + * @property string $ldapConnectionTimeout + * @property string $ldapAttributePhone + * @property string $ldapAttributeWebsite + * @property string $ldapAttributeAddress + * @property string $ldapAttributeTwitter + * @property string $ldapAttributeFediverse + * @property string $ldapAttributeOrganisation + * @property string $ldapAttributeRole + * @property string $ldapAttributeHeadline + * @property string $ldapAttributeBiography + * @property string $ldapAdminGroup */ class Configuration { public const AVATAR_PREFIX_DEFAULT = 'default'; diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 7c780ccbb4a4f..8c21032cfe614 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -41,49 +41,79 @@ use Psr\Log\LoggerInterface; /** - * magic properties (incomplete) + * magic properties * responsible for LDAP connections in context with the provided configuration * - * @property string ldapHost - * @property string ldapPort holds the port number - * @property string ldapUserFilter - * @property string ldapUserDisplayName - * @property string ldapUserDisplayName2 - * @property string ldapUserAvatarRule - * @property boolean turnOnPasswordChange - * @property string[] ldapBaseUsers - * @property int|null ldapPagingSize holds an integer - * @property bool|mixed|void ldapGroupMemberAssocAttr - * @property string ldapUuidUserAttribute - * @property string ldapUuidGroupAttribute - * @property string ldapExpertUUIDUserAttr - * @property string ldapExpertUUIDGroupAttr - * @property string ldapQuotaAttribute - * @property string ldapQuotaDefault - * @property string ldapEmailAttribute - * @property string ldapExtStorageHomeAttribute - * @property string homeFolderNamingRule - * @property bool|string markRemnantsAsDisabled - * @property bool|string ldapNestedGroups - * @property string[] ldapBaseGroups - * @property string ldapGroupFilter - * @property string ldapGroupDisplayName - * @property string ldapLoginFilter - * @property string ldapDynamicGroupMemberURL - * @property string ldapGidNumber - * @property int hasMemberOfFilterSupport - * @property int useMemberOfToDetectMembership - * @property string ldapMatchingRuleInChainState - * @property string ldapAttributePhone - * @property string ldapAttributeWebsite - * @property string ldapAttributeAddress - * @property string ldapAttributeTwitter - * @property string ldapAttributeFediverse - * @property string ldapAttributeOrganisation - * @property string ldapAttributeRole - * @property string ldapAttributeHeadline - * @property string ldapAttributeBiography - * @property string ldapAdminGroup + * @property string $ldapHost + * @property string $ldapPort + * @property string $ldapBackupHost + * @property string $ldapBackupPort + * @property string $ldapBackgroundHost + * @property string $ldapBackgroundPort + * @property array|'' $ldapBase + * @property array|'' $ldapBaseUsers + * @property array|'' $ldapBaseGroups + * @property string $ldapAgentName + * @property string $ldapAgentPassword + * @property string $ldapTLS + * @property string $turnOffCertCheck + * @property string $ldapIgnoreNamingRules + * @property string $ldapUserDisplayName + * @property string $ldapUserDisplayName2 + * @property string $ldapUserAvatarRule + * @property string $ldapGidNumber + * @property array|'' $ldapUserFilterObjectclass + * @property array|'' $ldapUserFilterGroups + * @property string $ldapUserFilter + * @property string $ldapUserFilterMode + * @property string $ldapGroupFilter + * @property string $ldapGroupFilterMode + * @property array|'' $ldapGroupFilterObjectclass + * @property array|'' $ldapGroupFilterGroups + * @property string $ldapGroupDisplayName + * @property string $ldapGroupMemberAssocAttr + * @property string $ldapLoginFilter + * @property string $ldapLoginFilterMode + * @property string $ldapLoginFilterEmail + * @property string $ldapLoginFilterUsername + * @property array|'' $ldapLoginFilterAttributes + * @property string $ldapQuotaAttribute + * @property string $ldapQuotaDefault + * @property string $ldapEmailAttribute + * @property string $ldapCacheTTL + * @property string $ldapUuidUserAttribute + * @property string $ldapUuidGroupAttribute + * @property string $ldapOverrideMainServer + * @property string $ldapConfigurationActive + * @property array|'' $ldapAttributesForUserSearch + * @property array|'' $ldapAttributesForGroupSearch + * @property string $ldapExperiencedAdmin + * @property string $homeFolderNamingRule + * @property string $hasMemberOfFilterSupport + * @property string $useMemberOfToDetectMembership + * @property string $ldapExpertUsernameAttr + * @property string $ldapExpertUUIDUserAttr + * @property string $ldapExpertUUIDGroupAttr + * @property string $markRemnantsAsDisabled + * @property string $lastJpegPhotoLookup + * @property string $ldapNestedGroups + * @property string $ldapPagingSize + * @property string $turnOnPasswordChange + * @property string $ldapDynamicGroupMemberURL + * @property string $ldapDefaultPPolicyDN + * @property string $ldapExtStorageHomeAttribute + * @property string $ldapMatchingRuleInChainState + * @property string $ldapConnectionTimeout + * @property string $ldapAttributePhone + * @property string $ldapAttributeWebsite + * @property string $ldapAttributeAddress + * @property string $ldapAttributeTwitter + * @property string $ldapAttributeFediverse + * @property string $ldapAttributeOrganisation + * @property string $ldapAttributeRole + * @property string $ldapAttributeHeadline + * @property string $ldapAttributeBiography + * @property string $ldapAdminGroup */ class Connection extends LDAPUtility { private ?\LDAP\Connection $ldapConnectionRes = null; @@ -418,7 +448,7 @@ private function doSoftValidation(): void { $backupPort = (int)$this->configuration->ldapBackupPort; if ($backupPort <= 0) { - $this->configuration->backupPort = $this->configuration->ldapPort; + $this->configuration->ldapBackupPort = $this->configuration->ldapPort; } //make sure empty search attributes are saved as simple, empty array @@ -433,7 +463,7 @@ private function doSoftValidation(): void { if ((stripos((string)$this->configuration->ldapHost, 'ldaps://') === 0) && $this->configuration->ldapTLS) { - $this->configuration->ldapTLS = false; + $this->configuration->ldapTLS = (string)false; $this->logger->info( 'LDAPS (already using secure connection) and TLS do not work together. Switched off TLS.', ['app' => 'user_ldap'] diff --git a/apps/user_ldap/lib/Group_Proxy.php b/apps/user_ldap/lib/Group_Proxy.php index 1544d5f91e9e4..718e915372fe0 100644 --- a/apps/user_ldap/lib/Group_Proxy.php +++ b/apps/user_ldap/lib/Group_Proxy.php @@ -73,7 +73,7 @@ protected function setup(): void { $this->backends[$configPrefix] = new Group_LDAP($this->getAccess($configPrefix), $this->groupPluginManager, $this->config, $this->ncUserManager); if (is_null($this->refBackend)) { - $this->refBackend = &$this->backends[$configPrefix]; + $this->refBackend = $this->backends[$configPrefix]; } } diff --git a/apps/user_ldap/lib/Jobs/Sync.php b/apps/user_ldap/lib/Jobs/Sync.php index b92aa2fcfaa90..16371df156285 100644 --- a/apps/user_ldap/lib/Jobs/Sync.php +++ b/apps/user_ldap/lib/Jobs/Sync.php @@ -169,7 +169,7 @@ public function runCycle($cycleData) { $results = $access->fetchListOfUsers( $filter, $access->userManager->getAttributes(), - $connection->ldapPagingSize, + (int)$connection->ldapPagingSize, $cycleData['offset'], true ); diff --git a/apps/user_ldap/lib/LDAP.php b/apps/user_ldap/lib/LDAP.php index 01f4e16ab1000..9322b6fbdaaa7 100644 --- a/apps/user_ldap/lib/LDAP.php +++ b/apps/user_ldap/lib/LDAP.php @@ -204,6 +204,7 @@ public function search($link, $baseDN, $filter, $attr, $attrsOnly = 0, $limit = $serverControls = []; } + /** @psalm-suppress UndefinedVariable $oldHandler is defined when the closure is called but psalm fails to get that */ $oldHandler = set_error_handler(function ($no, $message, $file, $line) use (&$oldHandler) { if (str_contains($message, 'Partial search results returned: Sizelimit exceeded')) { return true; diff --git a/apps/user_ldap/lib/User_Proxy.php b/apps/user_ldap/lib/User_Proxy.php index 96415491e4129..3df1990359a15 100644 --- a/apps/user_ldap/lib/User_Proxy.php +++ b/apps/user_ldap/lib/User_Proxy.php @@ -97,7 +97,7 @@ protected function setup(): void { ); if (is_null($this->refBackend)) { - $this->refBackend = &$this->backends[$configPrefix]; + $this->refBackend = $this->backends[$configPrefix]; } } diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 1b4c9162b71b9..1e55d67543f1d 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -414,7 +414,7 @@ private function determineGroups(string $dbKey, string $confKey, bool $testMembe $this->fetchGroups($dbKey, $confKey); if ($testMemberOf) { - $this->configuration->hasMemberOfFilterSupport = $this->testMemberOf(); + $this->configuration->hasMemberOfFilterSupport = (string)$this->testMemberOf(); $this->result->markChange(); if (!$this->configuration->hasMemberOfFilterSupport) { throw new \Exception('memberOf is not supported by the server'); @@ -700,8 +700,8 @@ public function guessPortAndTLS() { if ($settingsFound === true) { $config = [ - 'ldapPort' => $p, - 'ldapTLS' => (int)$t + 'ldapPort' => (string)$p, + 'ldapTLS' => (string)$t, ]; $this->configuration->setConfiguration($config); $this->logger->debug( @@ -1322,7 +1322,7 @@ private function getConnection(): \LDAP\Connection|false { $this->ldap->setOption($cr, LDAP_OPT_PROTOCOL_VERSION, 3); $this->ldap->setOption($cr, LDAP_OPT_REFERRALS, 0); $this->ldap->setOption($cr, LDAP_OPT_NETWORK_TIMEOUT, self::LDAP_NW_TIMEOUT); - if ($this->configuration->ldapTLS === 1) { + if ($this->configuration->ldapTLS) { $this->ldap->startTls($cr); } @@ -1337,6 +1337,9 @@ private function getConnection(): \LDAP\Connection|false { return false; } + /** + * @return array + */ private function getDefaultLdapPortSettings(): array { static $settings = [ ['port' => 7636, 'tls' => false], @@ -1349,6 +1352,9 @@ private function getDefaultLdapPortSettings(): array { return $settings; } + /** + * @return array + */ private function getPortSettingsToTry(): array { //389 ← LDAP / Unencrypted or StartTLS //636 ← LDAPS / SSL @@ -1367,7 +1373,7 @@ private function getPortSettingsToTry(): array { } $portSettings[] = ['port' => $port, 'tls' => false]; } elseif ($this->configuration->usesLdapi()) { - $portSettings[] = ['port' => '', 'tls' => false]; + $portSettings[] = ['port' => 0, 'tls' => false]; } //default ports diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index da3ff49f5f372..e828344c12283 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -1,99 +1,97 @@ - + - $data + - $data + - $data + - $data + - $principalUri + - $data + - $cardData + + + + + + + - array + - unserialize + - - - $uids - - - ]]> - - - $baseuri + - $baseuri + - \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog) - \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false) + + - $baseuri + - $baseuri + - $baseuri + - $baseuri + - registerEventListener + - setDateTime - setDateTime + + VEVENT->DTSTART]]> @@ -107,61 +105,61 @@ objectData['calendardata']]]> - $calendarData - $calendarData + + - array + - Reader::read($objectData) + - $objectData - $uris - $uris + + + - VCalendar + - null + - INode + - INode + getCalendarInCalendarHome($this->principalInfo['uri'], $calendarUri)]]> - calendarSearch + - $principal + - string|null + - $principalInfo + - $paths + @@ -169,47 +167,47 @@ DTEND]]> - hasTime - isFloating - isFloating + + + - $emailAddresses + ]]> - getDateTime - getDateTime - isFloating + + + - $provider::NOTIFICATION_TYPE + - $diff === false + - $vevents - VObject\Reader::read($calendarData, - VObject\Reader::OPTION_FORGIVING) + + - VObject\Component\VCalendar|null - VObject\Component\VEvent[] + + - getDateTime - getDateTime + + parent->UID]]> @@ -217,17 +215,17 @@ - array + - $principals + - string[] + - null - null + + @@ -241,8 +239,8 @@ - getNormalizedValue - getNormalizedValue + + @@ -254,20 +252,20 @@ DTEND]]> - get - getChildren + + - getDateTime - hasTime - isFloating - isFloating - principalSearch + + + + + - bool + @@ -278,7 +276,7 @@ ]]]> - string + @@ -293,7 +291,7 @@ - $webcalData + @@ -302,26 +300,26 @@ getKey()]]> - Reader::read($cardData) + - VCard + - $principal + - false + - Reader::read($cardData) + - VCard + @@ -329,23 +327,12 @@ - bool + - - - $type, - 'body' => $val - ]]]> - - - false|array{body: string, Content-Type: string} - - - string|null + @@ -356,89 +343,86 @@ - $groups + - \Sabre\HTTP\toDate($value) + - bool + - $data + - array{bool, string} + - tryTokenLogin + - $nodes + dirContent]]> - \Sabre\DAV\INode[] + node]]> - Folder + - null - null - null + + + - $fullSourcePath + node]]> - - $data - - \OCP\Files\File + - 0 + - bool + - \OCA\Circles\Api\v1\Circles + - getPath + - int - integer + + info->getId()]]> @@ -447,41 +431,41 @@ - array + - $principals + - string[] + - $results + circleToPrincipal($decodedName) ?: $this->circleToPrincipal($name)]]> - null - null - null - null - null - null - null + + + + + + + - \OCA\Circles\Api\v1\Circles - \OCA\Circles\Api\v1\Circles + + - new \OCA\DAV\Connector\Sabre\QuotaPlugin($view, true) + - $shareType + @@ -491,10 +475,10 @@ - null + - getId + @@ -504,39 +488,39 @@ - $whereValues + - array - string + + - $principals + - string[] + - $members + - null - null - null - null - null - null - null + + + + + + + - array + - null + @@ -546,13 +530,13 @@ - $value + - ?string + - $search + getTimestamp() !== false]]> @@ -567,7 +551,7 @@ backend->getArbiterPath()]]> - bool + @@ -578,12 +562,12 @@ - $arguments + - $arguments + @@ -608,14 +592,14 @@ l10n->l('date', $startDateTime, ['width' => 'medium'])]]> - string + - getDateTime - getDateTime - hasTime - isFloating - isFloating + + + + + @@ -623,52 +607,52 @@ getCursor()]]> - getDateTime - getDateTime - hasTime + + + - $tagId - $tagName + + - $objectName + - $members + - false + currentStream]]> - $context + - array + - array_values + - getId - getId - getId - getInternalPath - getNode - getSize + + + + + + @@ -681,7 +665,7 @@ ]]]> - array{name: string, displayName: string, description: ?string, vCards: VCard[]} + @@ -696,12 +680,12 @@ - $position + - throw $exception; + @@ -714,48 +698,48 @@ files->getMount($path)->getStorage()]]> - \OC\Files\Storage\Storage|null + - $id - $id - $id - $id - $id - $id - $remoteId + + + + + + + - $shareId - $shareId - $shareId - $shareId + + + + - bool - bool - bool + + + - $id - $id - $id - $id + + + + - $shareId + - string + @@ -763,27 +747,22 @@ - $result + ]]> - - - $files_list - - fileEncrypted[$fileId]]]> - $folder + fileEncrypted[$fileId]]]> - Folder + fileIsEncrypted]]> @@ -804,53 +783,50 @@ - null - null + + - $templateId + - getTemplates - open + + - $file - $i - $i - $i - $i - $i - $i - $i - $i - $i - $i - $i - $i + + + + + + + + + + + + + - - empty($encryptedFiles) - - isReadyForUser + - $this + getCode()]]> - (int)$status + @@ -863,7 +839,7 @@ - put + @@ -882,59 +858,54 @@ lastModified]]> - filetype - fopen + + - login + - decrypt - encrypt - setIV - setIV - setKey + + + + + - test + - (int)$code - (int)$code + + - \OCA\Circles\Api\v1\Circles - \OCA\Circles\Api\v1\Circles + + getRoomShareHelper()]]> getRoomShareHelper()]]> getRoomShareHelper()]]> - \OCA\Talk\Share\Helper\ShareAPIController + - - - $files_list - - - $mount + - Mount + - $cacheData + @@ -944,26 +915,26 @@ - array_values + - $itemSource - $itemSource + + - $shareWith + - fetchRow + - bool + @@ -971,10 +942,10 @@ sourceRootInfo]]> - ICacheEntry + - new FailedCache() + sourceRootInfo]]> @@ -982,7 +953,7 @@ - moveMount + @@ -993,7 +964,7 @@ - int + data->getId()]]> @@ -1001,66 +972,66 @@ - $entry + - ITrash + - getChild + - null + - INode + - $entry + - ITrash + - $file + - false + - $timestamp + - $timestamp + - $this - $this + + - getChild + - null + - getChild + @@ -1080,23 +1051,23 @@ - $groupid === null - $groupid === null + + - Response + - getSettingsManager + - ignoreNextcloudRequirementForApp + @@ -1106,12 +1077,12 @@ - isReady + - null + @@ -1131,26 +1102,26 @@ getRgb())]]> - array{0: int, 1: int, 2: int} + - $ln + 1 + - $this + - $uuid - $values + + - string[] + getCode()]]> @@ -1158,43 +1129,43 @@ - $subj + - default: + + break;]]> - $groupID + - $gid + - $i + - null + - isset($qb) + - isset($qb) + - public function setLdapAccess(Access $access) { + @@ -1205,7 +1176,7 @@ refreshedFeatures]]> - null + 0)]]> @@ -1213,38 +1184,38 @@ - string|false + - $limit - $offset + + - null + 0)]]> - is_string($dn) + - $uid + - $possibleAttrs[$i] + - registerProvider + - null + @@ -1252,13 +1223,13 @@ size]]> - $size + size]]> - string + @@ -1268,16 +1239,16 @@ - $decodedValue[1] - $decodedValue[1] - $decodedValue[1] - $decodedValue[1] + + + + - $hour1 - $minute1 + + @@ -1287,56 +1258,46 @@ - string + - $missingCheck + - $result + - $result + - bool + - getAllConfiguredScopesForOperation - getChecks - getOperations - getOperations - isUserScopeEnabled + + + + + - $arguments + - - - $result === false - - - array + - - - $result === true - - - 0 - 1 + + @@ -1344,31 +1305,31 @@ appConfig->getValues($app, false)]]> - getFilteredValues + - 0 - 1 + + - null + - [0] + - string[] + - $levelNum + @@ -1378,39 +1339,29 @@ - getAllMappings - updateFilecache + + - - - $found - $found - - - array{shareId: int, fileTarget: string, initiator: string, receiver: string, owner: string, mountOwner: string}[] - array{shareId: int, fileTarget: string, initiator: string, receiver: string, owner: string, mountOwner: string}[] - - - section - section + + - [] + - !is_string($stateToken) + - searchCollections + @@ -1420,7 +1371,7 @@ - findMatchingRoute + @@ -1430,13 +1381,13 @@ - $this + create('core_ajax_update', '/core/ajax/update.php')]]> - getIcon + @@ -1446,7 +1397,7 @@ - $restrictions + @@ -1459,46 +1410,46 @@ settings]]> - ActivitySettings[] + - $key + - !is_array($userIds) + - array - array + + - fetch + - bool + - version_compare($first, $second, $operator) + - $array[$element][] - $array[$element][] + + - (string)$xml + - array + @@ -1513,21 +1464,21 @@ - getName + - boolean|null + server]]> - \OCP\IServerContainer + - getAppDataDir + @@ -1535,45 +1486,41 @@ request->method]]> - null + - @readfile($path) - http_response_code() + + - bool - int + + - $name - $remoteAddress getOverwriteHost()]]> - method]]> - $uri cookies[$key]) ? $this->cookies[$key] : null]]> env[$key]) ? $this->env[$key] : null]]> files[$key]) ? $this->files[$key] : null]]> - \is_array($params) + - \Sabre\HTTP\decodePath($pathInfo) + - log + - setOCSVersion + @@ -1587,7 +1534,7 @@ request->server]]> - \OCA\Talk\Controller\PageController + @@ -1597,7 +1544,7 @@ - $default + @@ -1643,10 +1590,10 @@ }, $constructor->getParameters()))]]> - ArrayAccess + - \stdClass + getCode()]]> @@ -1659,27 +1606,27 @@ - $trySession + - getExpires - getLastCheck - getLoginName - getName - getPassword - getRemember - getScope - setExpires - setLastCheck - setName - setPassword - setPasswordInvalid - setScope - setScope - setToken - setType + + + + + + + + + + + + + + + + @@ -1688,13 +1635,13 @@ providers]]> - [] + providers]]> - IProvider[] + providers]]> @@ -1702,13 +1649,13 @@ - \ArrayAccess + - bool|mixed - bool|mixed + + @@ -1730,7 +1677,7 @@ )]]> - ICreateFromString[] + - $serializedCallable + - [LaravelClosure::class] + - (string)$id + @@ -1769,8 +1716,8 @@ set($key, $value)]]> - $CONFIG - $CONFIG + + @@ -1780,12 +1727,12 @@ - $searchOptions + - getParams + @@ -1793,10 +1740,10 @@ - getParams + - $params + @@ -1808,15 +1755,15 @@ getCode())]]> - 0 + - $s + - IMigrationStep + @@ -1824,13 +1771,13 @@ functionBuilder->lower($x)]]> - $y - $y + + - getParams + @@ -1838,22 +1785,21 @@ - string + - $alias + - $groupBys - $selects + - string + - $string + @@ -1868,25 +1814,25 @@ ])]]> - string + - $timestamp + - float + - microtime(true) + - stopQuery + @@ -1894,14 +1840,14 @@ execute()]]> - TemplateResponse - int + + - $template - $template - $template - $template + + + + @@ -1909,35 +1855,27 @@ manager->getFileForToken($this->data['user_id'], $this->data['file_id'], $this->data['file_path'])]]> - getShareForToken + - - - $uniqueUserIds, 'public' => $public]]]> - - - array{users: string[], public: bool} - - - deleteUserKey + - null - null - null + + + - bool + - $providerId + @@ -1945,61 +1883,61 @@ folder]]> - Folder + - $parentData + - array + - $path - \OC_Util::normalizeUnicode($path) + + - null - null + + - $searchQuery + - [] + - getIncomplete - insert - put + + + - $data + - $file - $file + + - self::SCAN_RECURSIVE_INCOMPLETE + - $existingChildren + - array[] + - array + getStorageInfo($storageId)]]> @@ -2012,16 +1950,16 @@ - array - array + + - $searchQuery + - $user + @@ -2032,17 +1970,17 @@ - remoteStorageMounts - removeUserStorageMount + + - array + cacheInfoCache[$fileId]]]> - array{int, string, int} + @@ -2052,25 +1990,25 @@ findByStorageId($id)]]> - Mount\MountPoint[] - Mount\MountPoint[] - \OC\Files\Storage\Storage|null + + + - addStorageWrapper + - wrap + - \OCP\Files\Mount\IMountPoint + - null + @@ -2078,7 +2016,7 @@ view->hash($type, $this->path, $raw)]]> - string + @@ -2089,28 +2027,28 @@ }, $files)]]> - $node + - \OC\Files\Node\Node - \OC\Files\Node\Node[] + + - emit - emit - emit - emit - emit - emit - emit - emit - emit - emit - emit - emit - emit + + + + + + + + + + + + + @@ -2120,30 +2058,30 @@ - $node + - Folder + - FileInfo + - getChecksum + parent]]> - INode|IRootFolder + fileInfo]]> - $type + fileInfo]]> @@ -2152,7 +2090,7 @@ - $folders + createNode($fullPath, $fileInfo, false)]]> mountManager->findByNumericId($numericId)]]> mountManager->findByStorageId($storageId)]]> @@ -2160,63 +2098,63 @@ user]]> - MountPoint[] - Node - \OC\Files\Mount\MountPoint[] - \OC\Files\Mount\MountPoint[] - \OC\User\User + + + + + user]]> - remove + - $source + - ClientResolver::_default_signature_provider() - ClientResolver::_default_signature_provider() + + - ClientResolver::_default_signature_provider() + - Promise\promise_for( + + )]]> - upload + - \Aws\serialize($command) + - null + - string + - string|false + - !$permissions + copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file)]]> @@ -2232,39 +2170,39 @@ - ArrayCache - ArrayCache + + getBody()]]> - fopen + - null + - new FailedCache() - true + + - getCache - verifyPath + + - $file + - $space === false || is_null($space) - is_null($space) + + - $stat === false + @@ -2275,9 +2213,9 @@ - \Normalizer::FORM_C - \Normalizer::FORM_C - \Normalizer::FORM_D + + + namesCache]]> @@ -2301,21 +2239,21 @@ - $result - $result + + copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file, false, $isRename)]]> - $newUnencryptedSize - $result + + - bool - int + + - $lastChunkPos - $size + + @@ -2323,7 +2261,7 @@ getWrapperStorage()->filetype($this->getUnjailedPath($path))]]> - bool + @@ -2331,23 +2269,23 @@ getWrapperStorage()->test()]]> - true + - stream_close - stream_flush + + - !$isDefaultTemplates + - $mimetype + @@ -2355,25 +2293,25 @@ execute()]]> - int + - $mounts + - \OC\Files\Mount\MountPoint[] + - $mtime + - acquireLock - changeLock - releaseLock + + + @@ -2383,16 +2321,16 @@ - bool + - $hide + - $users + - \OC\User\User[] + emitter]]> @@ -2400,31 +2338,31 @@ emitter]]> - addToGroup - countUsersInGroup - deleteGroup - removeFromGroup + + + + - $groups - array_values($groups) - array_values($groups) + + + - \OC\Group\Group[] - \OC\Group\Group[] + + - createGroup - getGroupDetails - isAdmin + + + - string|resource + stream ? @@ -2434,15 +2372,15 @@ - false - false + + - null + @@ -2452,41 +2390,41 @@ getDN(true)['CN']]]> - getOnlyDefaultAliases + - ExcludeFileByNameFilterIterator + - ExcludeFoldersByPathFilterIterator + - null|string + - array|mixed + - $matches[1] + - get + - [] + - getIncomplete + - getOwner - getPermissions + + - new IteratorDirectory([]) - new NullCache() + + - getCache - opendir + + - null - null + + - new IteratorDirectory([]) + - $callback() + - $sessionCallback + - $request + - $limit === null + @@ -2561,58 +2499,58 @@ getPrefix() . $key, $value, $ttl)]]> - bool + - mixed - mixed - mixed - mixed + + + + - [] + - $maxPreviewImage + - null|string + - ISimpleFile + - height - height - preciseResizeCopy - resizeCopy - valid - width - width + + + + + + + - $thumbnail === false ? null: $thumbnail + - ?IImage + - \RedisCluster::OPT_SLAVE_FAILOVER + - array + @@ -2620,25 +2558,25 @@ getBody()]]> - bool|string + - $response + - false + - $arguments + - $arguments + @@ -2648,20 +2586,20 @@ - $out + - $out + - \OC_APP + - string + collectionName]]> @@ -2669,7 +2607,7 @@ - $provider instanceof Provider + @@ -2682,7 +2620,7 @@ - null + @@ -2701,25 +2639,25 @@ execute()]]> - int - int + + - decrypt - encrypt - setIV - setIV - setPassword - setPassword + + + + + + - \OCP\Calendar\Resource\IManager - \OCP\Calendar\Room\IManager - \OCP\Files\Folder|null + + + get(IFile::class)]]> @@ -2730,15 +2668,15 @@ get(\OCP\Encryption\IManager::class)]]> - \OC\Encryption\File - \OC\Encryption\Manager - \OC\Group\Manager - \OC\NavigationManager - \OC\User\Manager - \OC\User\Session + + + + + + - \OC\OCSClient + @@ -2751,12 +2689,12 @@ - $value + - $value + @@ -2764,7 +2702,7 @@ - $vendor + @@ -2785,59 +2723,59 @@ - set + - getParent + - $id + - update + - \OCA\Circles\Api\v1\Circles + - getChildren + - FederatedShareProvider - ShareByMailProvider + + - $provider - $provider + + shareByCircleProvider]]> - getProviderForType + - null - null - null - null - null - null + + + + + + - $shareProviderClass + - \OCA\Circles\ShareByCircleProvider + - RoomShareProvider - \OCA\Circles\ShareByCircleProvider - \OCA\Talk\Share\RoomShareProvider - private $roomShareProvider = null; - private $shareByCircleProvider = null; + + + + + @@ -2845,107 +2783,107 @@ node]]> - getNode + - get + - listen - listen + + - getSupportedApps + - \OCP\ITags + - null + - $from - $names + + - $tag + - false - false + + - $style - $style + + - null - null + + - false + - $script - $script + + - string - string + + - $appName - $appName + + - getInitialStates + - $path + - false + - IUser|false + - $backend + - createUser - getUsersForUserValueCaseInsensitive + + - boolean|null + server]]> @@ -2954,77 +2892,77 @@ - emit - emit - emit - emit - emit + + + + + - int + - null + - $groupsList + - null + - $appId === null - $appId === null + + - \OC\InsufficientStorageException + - $getType === self::ZIP_DIR - $getType === self::ZIP_DIR + + - get - get + + - $matches[0][$last_match] - $matches[1][$last_match] + + - $path + - getQuota + - bool|string + - \Test\Util\User\Dummy + - void + @@ -3039,10 +2977,10 @@ - string + - $column + @@ -3050,50 +2988,41 @@ headers)]]> - array{X-Request-Id: string, Cache-Control: string, Content-Security-Policy: string, Feature-Policy: string, X-Robots-Tag: string, Last-Modified?: string, ETag?: string, ...H} + - - - DO_NOT_REMEMBER - PERMANENT_TOKEN - REMEMBER - TEMPORARY_TOKEN - WIPE_TOKEN - - - $step + - array{0: int, 1: int, 2: int} + - mixed + - ArrayAccess - IteratorAggregate + + - \OC_App::getStorage($app) + - array + - \Iterator + @@ -3101,7 +3030,7 @@ mode]]> - null|IPreview::MODE_FILL|IPreview::MODE_COVER + diff --git a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php index 873744e6f9480..611b880cefd08 100644 --- a/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php +++ b/core/Command/Maintenance/Mimetype/GenerateMimetypeFileBuilder.php @@ -31,7 +31,7 @@ class GenerateMimetypeFileBuilder { /** * Generate mime type list file * - * @param array $aliases + * @param array $aliases * @return string */ public function generateFile(array $aliases): string { diff --git a/core/Command/Preview/Generate.php b/core/Command/Preview/Generate.php index 865283191993b..b43f52a66a80b 100644 --- a/core/Command/Preview/Generate.php +++ b/core/Command/Preview/Generate.php @@ -57,13 +57,13 @@ protected function configure() { protected function execute(InputInterface $input, OutputInterface $output): int { $fileInput = $input->getArgument("file"); $sizes = $input->getOption("size"); - $sizes = array_map(function (string $size) use ($output, &$error) { + $sizes = array_map(function (string $size) use ($output) { if (str_contains($size, 'x')) { $sizeParts = explode('x', $size, 2); } else { $sizeParts = [$size, $size]; } - if (!is_numeric($sizeParts[0]) || !is_numeric($sizeParts[1])) { + if (!is_numeric($sizeParts[0]) || !is_numeric($sizeParts[1] ?? null)) { $output->writeln("Invalid size $size"); return null; } diff --git a/lib/base.php b/lib/base.php index 891161ff0c602..1443726705202 100644 --- a/lib/base.php +++ b/lib/base.php @@ -662,11 +662,11 @@ public static function init(): void { //this doesn´t work always depending on the webserver and php configuration. //Let´s try to overwrite some defaults if they are smaller than 1 hour - if (intval(@ini_get('max_execution_time') ?? 0) < 3600) { + if (intval(@ini_get('max_execution_time') ?: 0) < 3600) { @ini_set('max_execution_time', strval(3600)); } - if (intval(@ini_get('max_input_time') ?? 0) < 3600) { + if (intval(@ini_get('max_input_time') ?: 0) < 3600) { @ini_set('max_input_time', strval(3600)); } diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php index 338792e23d179..0732294abae57 100644 --- a/lib/private/AppConfig.php +++ b/lib/private/AppConfig.php @@ -850,11 +850,10 @@ private function setTypedValue( // update local cache if ($lazy) { - $cache = &$this->lazyCache; + $this->lazyCache[$app][$key] = $value; } else { - $cache = &$this->fastCache; + $this->fastCache[$app][$key] = $value; } - $cache[$app][$key] = $value; $this->valueTypes[$app][$key] = $type; return true; @@ -1264,11 +1263,10 @@ private function loadConfig(?bool $lazy = false): void { foreach ($rows as $row) { // most of the time, 'lazy' is not in the select because its value is already known if (($row['lazy'] ?? ($lazy ?? 0) ? 1 : 0) === 1) { - $cache = &$this->lazyCache; + $this->lazyCache[$row['appid']][$row['configkey']] = $row['configvalue'] ?? ''; } else { - $cache = &$this->fastCache; + $this->fastCache[$row['appid']][$row['configkey']] = $row['configvalue'] ?? ''; } - $cache[$row['appid']][$row['configkey']] = $row['configvalue'] ?? ''; $this->valueTypes[$row['appid']][$row['configkey']] = (int)($row['type'] ?? 0); } $result->closeCursor(); diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 7a614878ab55e..af3993df8bddc 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -57,12 +57,12 @@ * Class for accessing variables in the request. * This class provides an immutable object with request variables. * - * @property mixed[] cookies - * @property mixed[] env - * @property mixed[] files - * @property string method - * @property mixed[] parameters - * @property mixed[] server + * @property mixed[] $cookies + * @property mixed[] $env + * @property mixed[] $files + * @property string $method + * @property mixed[] $parameters + * @property mixed[] $server * @template-implements \ArrayAccess */ class Request implements \ArrayAccess, \Countable, IRequest { diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php index 77f09df307de7..d148ecbdfc46f 100644 --- a/lib/private/AppFramework/Utility/SimpleContainer.php +++ b/lib/private/AppFramework/Utility/SimpleContainer.php @@ -228,8 +228,8 @@ public function offsetGet($id) { /** * @deprecated 20.0.0 use \OCP\IContainer::registerService */ - public function offsetSet($id, $service): void { - $this->container->offsetSet($id, $service); + public function offsetSet($offset, $value): void { + $this->container->offsetSet($offset, $value); } /** diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php index a6140e44eb629..ef300b0f3b082 100644 --- a/lib/private/Archive/TAR.php +++ b/lib/private/Archive/TAR.php @@ -48,15 +48,9 @@ class TAR extends Archive { */ private $cachedHeaders = false; - /** - * @var \Archive_Tar - */ - private $tar = null; + private \Archive_Tar $tar; - /** - * @var string - */ - private $path; + private string $path; public function __construct(string $source) { $types = [null, 'gz', 'bz2']; @@ -137,7 +131,7 @@ public function rename(string $source, string $dest): bool { $tmp = \OC::$server->getTempManager()->getTemporaryFolder(); $this->tar->extract($tmp); rename($tmp . $source, $tmp . $dest); - $this->tar = null; + $this->tar->_close(); unlink($this->path); $types = [null, 'gz', 'bz']; $this->tar = new \Archive_Tar($this->path, $types[self::getTarType($this->path)]); @@ -209,11 +203,16 @@ public function getFolder(string $path): array { * get all files in the archive */ public function getFiles(): array { - if ($this->fileList) { + if ($this->fileList !== false) { return $this->fileList; } - if (!$this->cachedHeaders) { - $this->cachedHeaders = $this->tar->listContent(); + if ($this->cachedHeaders === false) { + $headers = $this->tar->listContent(); + if (is_array($headers)) { + $this->cachedHeaders = $headers; + } else { + return []; + } } $files = []; foreach ($this->cachedHeaders as $header) { @@ -230,6 +229,7 @@ public function getFiles(): array { */ public function getFile(string $path) { $string = $this->tar->extractInString($path); + /** @var ?string $string */ if (is_string($string)) { return $string; } else { @@ -300,7 +300,6 @@ public function remove(string $path): bool { $tmp = \OC::$server->getTempManager()->getTemporaryFolder(); $this->tar->extract($tmp); \OCP\Files::rmdirr($tmp . $path); - $this->tar = null; unlink($this->path); $this->reopen(); $this->tar->createModify([$tmp], '', $tmp); @@ -347,10 +346,7 @@ public function writeBack(string $tmpFile, string $path): void { * reopen the archive to ensure everything is written */ private function reopen(): void { - if ($this->tar) { - $this->tar->_close(); - $this->tar = null; - } + $this->tar->_close(); $types = [null, 'gz', 'bz']; $this->tar = new \Archive_Tar($this->path, $types[self::getTarType($this->path)]); } @@ -359,7 +355,7 @@ private function reopen(): void { * Get error object from archive_tar. */ public function getError(): ?\PEAR_Error { - if ($this->tar instanceof \Archive_Tar && $this->tar->error_object instanceof \PEAR_Error) { + if ($this->tar->error_object instanceof \PEAR_Error) { return $this->tar->error_object; } return null; diff --git a/lib/private/DB/QueryBuilder/QueryBuilder.php b/lib/private/DB/QueryBuilder/QueryBuilder.php index c2818911ccf88..d78cf50e319e0 100644 --- a/lib/private/DB/QueryBuilder/QueryBuilder.php +++ b/lib/private/DB/QueryBuilder/QueryBuilder.php @@ -975,14 +975,10 @@ public function groupBy(...$groupBys) { * * @return $this This QueryBuilder instance. */ - public function addGroupBy(...$groupBys) { - if (count($groupBys) === 1 && is_array($groupBys[0])) { - $$groupBys = $groupBys[0]; - } - + public function addGroupBy(...$groupBy) { call_user_func_array( [$this->queryBuilder, 'addGroupBy'], - $this->helper->quoteColumnNames($groupBys) + $this->helper->quoteColumnNames($groupBy) ); return $this; diff --git a/lib/private/DirectEditing/Manager.php b/lib/private/DirectEditing/Manager.php index 4db41d85a3e4a..232aa711459df 100644 --- a/lib/private/DirectEditing/Manager.php +++ b/lib/private/DirectEditing/Manager.php @@ -297,10 +297,9 @@ public function createToken($editorId, File $file, string $filePath, ?IShare $sh } /** - * @param $userId - * @param $fileId - * @param null $filePath - * @return Node + * @param string $userId + * @param int $fileId + * @param ?string $filePath * @throws NotFoundException */ public function getFileForToken($userId, $fileId, $filePath = null): Node { diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 2c90a28fe3b0a..0861b9e8a98d7 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -524,6 +524,7 @@ public function getSourcePath($path) { $realPath = realpath($pathToResolve); while ($realPath === false) { // for non existing files check the parent directory $currentPath = dirname($currentPath); + /** @psalm-suppress TypeDoesNotContainType Let's be extra cautious and still check for empty string */ if ($currentPath === '' || $currentPath === '.') { return $fullPath; } diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php index 71b8cb986d71a..a6944995f4c8b 100644 --- a/lib/private/Files/Type/Detection.php +++ b/lib/private/Files/Type/Detection.php @@ -56,32 +56,19 @@ class Detection implements IMimeTypeDetector { private const CUSTOM_MIMETYPEMAPPING = 'mimetypemapping.json'; private const CUSTOM_MIMETYPEALIASES = 'mimetypealiases.json'; - protected $mimetypes = []; - protected $secureMimeTypes = []; - - protected $mimetypeIcons = []; - /** @var string[] */ - protected $mimeTypeAlias = []; - - /** @var IURLGenerator */ - private $urlGenerator; - - private LoggerInterface $logger; - - /** @var string */ - private $customConfigDir; - - /** @var string */ - private $defaultConfigDir; - - public function __construct(IURLGenerator $urlGenerator, - LoggerInterface $logger, - string $customConfigDir, - string $defaultConfigDir) { - $this->urlGenerator = $urlGenerator; - $this->logger = $logger; - $this->customConfigDir = $customConfigDir; - $this->defaultConfigDir = $defaultConfigDir; + protected array $mimetypes = []; + protected array $secureMimeTypes = []; + + protected array $mimetypeIcons = []; + /** @var array */ + protected array $mimeTypeAlias = []; + + public function __construct( + private IURLGenerator $urlGenerator, + private LoggerInterface $logger, + private string $customConfigDir, + private string $defaultConfigDir, + ) { } /** @@ -151,7 +138,7 @@ private function loadAliases(): void { } /** - * @return string[] + * @return array */ public function getAllAliases(): array { $this->loadAliases(); diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php index 2b6eb70502b45..30f55107a96a1 100644 --- a/lib/private/Group/Manager.php +++ b/lib/private/Group/Manager.php @@ -98,26 +98,15 @@ public function __construct(\OC\User\Manager $userManager, $this->logger = $logger; $this->displayNameCache = new DisplayNameCache($cacheFactory, $this); - $cachedGroups = &$this->cachedGroups; - $cachedUserGroups = &$this->cachedUserGroups; - $this->listen('\OC\Group', 'postDelete', function ($group) use (&$cachedGroups, &$cachedUserGroups) { - /** - * @var \OC\Group\Group $group - */ - unset($cachedGroups[$group->getGID()]); - $cachedUserGroups = []; + $this->listen('\OC\Group', 'postDelete', function (IGroup $group): void { + unset($this->cachedGroups[$group->getGID()]); + $this->cachedUserGroups = []; }); - $this->listen('\OC\Group', 'postAddUser', function ($group) use (&$cachedUserGroups) { - /** - * @var \OC\Group\Group $group - */ - $cachedUserGroups = []; + $this->listen('\OC\Group', 'postAddUser', function (IGroup $group): void { + $this->cachedUserGroups = []; }); - $this->listen('\OC\Group', 'postRemoveUser', function ($group) use (&$cachedUserGroups) { - /** - * @var \OC\Group\Group $group - */ - $cachedUserGroups = []; + $this->listen('\OC\Group', 'postRemoveUser', function (IGroup $group): void { + $this->cachedUserGroups = []; }); } diff --git a/lib/private/Preview/MimeIconProvider.php b/lib/private/Preview/MimeIconProvider.php index 80073c307c9f9..d0c484d20a554 100644 --- a/lib/private/Preview/MimeIconProvider.php +++ b/lib/private/Preview/MimeIconProvider.php @@ -47,7 +47,7 @@ public function getMimeIconUrl(string $mime): null|string { $aliases = $this->mimetypeDetector->getAllAliases(); // Remove comments - $aliases = array_filter($aliases, static function ($key) { + $aliases = array_filter($aliases, static function (string $key) { return !($key === '' || $key[0] === '_'); }, ARRAY_FILTER_USE_KEY); diff --git a/lib/private/Share20/Share.php b/lib/private/Share20/Share.php index 19b36cb60e81e..e1d8818216b7a 100644 --- a/lib/private/Share20/Share.php +++ b/lib/private/Share20/Share.php @@ -91,27 +91,23 @@ class Share implements IShare { /** @var string */ private $label = ''; - /** @var IRootFolder */ - private $rootFolder; - - /** @var IUserManager */ - private $userManager; - /** @var ICacheEntry|null */ private $nodeCacheEntry; /** @var bool */ private $hideDownload = false; - public function __construct(IRootFolder $rootFolder, IUserManager $userManager) { - $this->rootFolder = $rootFolder; - $this->userManager = $userManager; + public function __construct( + private IRootFolder $rootFolder, + private IUserManager $userManager, + ) { } /** * @inheritdoc */ public function setId($id) { + /** @var mixed $id Let's be safe until strong typing */ if (is_int($id)) { $id = (string)$id; } @@ -538,7 +534,7 @@ public function getToken() { /** * Set the parent of this share * - * @param int parent + * @param int $parent * @return IShare * @deprecated The new shares do not have parents. This is just here for legacy reasons. */ diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 66a9529483e82..a8664dd2048a0 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -79,35 +79,26 @@ class Manager extends PublicEmitter implements IUserManager { /** * @var \OCP\UserInterface[] $backends */ - private $backends = []; + private array $backends = []; /** - * @var \OC\User\User[] $cachedUsers + * @var array $cachedUsers */ - private $cachedUsers = []; + private array $cachedUsers = []; - /** @var IConfig */ - private $config; - - /** @var ICache */ - private $cache; - - /** @var IEventDispatcher */ - private $eventDispatcher; + private ICache $cache; private DisplayNameCache $displayNameCache; - public function __construct(IConfig $config, + public function __construct( + private IConfig $config, ICacheFactory $cacheFactory, - IEventDispatcher $eventDispatcher) { - $this->config = $config; + private IEventDispatcher $eventDispatcher, + ) { $this->cache = new WithLocalCache($cacheFactory->createDistributed('user_backend_map')); - $cachedUsers = &$this->cachedUsers; - $this->listen('\OC\User', 'postDelete', function ($user) use (&$cachedUsers) { - /** @var \OC\User\User $user */ - unset($cachedUsers[$user->getUID()]); + $this->listen('\OC\User', 'postDelete', function (IUser $user): void { + unset($this->cachedUsers[$user->getUID()]); }); - $this->eventDispatcher = $eventDispatcher; $this->displayNameCache = new DisplayNameCache($cacheFactory, $this); } diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php index 1b2f83941c87a..7e6d86326425c 100644 --- a/lib/private/legacy/OC_Files.php +++ b/lib/private/legacy/OC_Files.php @@ -104,7 +104,7 @@ private static function sendHeaders($filename, $name, array $rangeArray): void { * return the content of a file or return a zip file containing multiple files * * @param string $dir - * @param string $files ; separated list of files to download + * @param string|array $files ; separated list of files to download * @param array $params ; 'head' boolean to only send header of the request ; 'range' http range header */ public static function get($dir, $files, $params = null) { diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 9a12bd50e0e7b..7c9810e9081b4 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -138,7 +138,7 @@ public static function computerFileSize(string $str): false|int|float { $bytes = (float)$str; - if (preg_match('#([kmgtp]?b?)$#si', $str, $matches) && !empty($bytes_array[$matches[1]])) { + if (preg_match('#([kmgtp]?b?)$#si', $str, $matches) && isset($bytes_array[$matches[1]])) { $bytes *= $bytes_array[$matches[1]]; } else { return false; diff --git a/lib/public/Files/IMimeTypeDetector.php b/lib/public/Files/IMimeTypeDetector.php index 9992c153edc75..4933975e1083b 100644 --- a/lib/public/Files/IMimeTypeDetector.php +++ b/lib/public/Files/IMimeTypeDetector.php @@ -84,7 +84,7 @@ public function detectString($data); public function mimeTypeIcon($mimeType); /** - * @return string[] + * @return array * @since 28.0.0 */ public function getAllAliases(): array; diff --git a/lib/public/Share/IShare.php b/lib/public/Share/IShare.php index a059696a75e93..0961631ea92f5 100644 --- a/lib/public/Share/IShare.php +++ b/lib/public/Share/IShare.php @@ -587,6 +587,7 @@ public function getMailSend(); * Set the cache entry for the shared node * * @param ICacheEntry $entry + * @return void * @since 11.0.0 */ public function setNodeCacheEntry(ICacheEntry $entry); diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index 1794df5aa8dc6..c47f56b3e81b7 100644 --- a/vendor-bin/psalm/composer.lock +++ b/vendor-bin/psalm/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "amphp/amp", - "version": "v2.6.2", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "url": "https://api.github.com/repos/amphp/amp/zipball/ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", + "reference": "ded3d9be08f526089eb7ee8d9f16a9768f9dec2d", "shasum": "" }, "require": { @@ -29,8 +29,8 @@ "ext-json": "*", "jetbrains/phpstorm-stubs": "^2019.3", "phpunit/phpunit": "^7 | ^8 | ^9", - "psalm/phar": "^3.11@dev", - "react/promise": "^2" + "react/promise": "^2", + "vimeo/psalm": "^3.12" }, "type": "library", "extra": { @@ -85,7 +85,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" + "source": "https://github.com/amphp/amp/tree/v2.6.4" }, "funding": [ { @@ -93,7 +93,7 @@ "type": "github" } ], - "time": "2022-02-20T17:52:18+00:00" + "time": "2024-03-21T18:52:26+00:00" }, { "name": "amphp/byte-stream", @@ -174,16 +174,16 @@ }, { "name": "composer/pcre", - "version": "3.0.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4482b6409ca6bfc2af043a5711cd21ac3e7a8dfb" + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4482b6409ca6bfc2af043a5711cd21ac3e7a8dfb", - "reference": "4482b6409ca6bfc2af043a5711cd21ac3e7a8dfb", + "url": "https://api.github.com/repos/composer/pcre/zipball/5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", + "reference": "5b16e25a5355f1f3afdfc2f954a0a80aec4826a8", "shasum": "" }, "require": { @@ -225,7 +225,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.0.2" + "source": "https://github.com/composer/pcre/tree/3.1.3" }, "funding": [ { @@ -241,20 +241,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T20:24:16+00:00" + "time": "2024-03-19T10:26:25+00:00" }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -304,9 +304,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -322,20 +322,20 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "ced299686f41dce890debac69273b47ffe98a40c" + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", - "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", "shasum": "" }, "require": { @@ -346,7 +346,7 @@ "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^6.0" + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" }, "type": "library", "autoload": { @@ -370,9 +370,9 @@ "performance" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" }, "funding": [ { @@ -388,7 +388,7 @@ "type": "tidelift" } ], - "time": "2022-02-25T21:32:43+00:00" + "time": "2024-03-26T18:29:49+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -427,6 +427,53 @@ }, "time": "2019-12-04T15:06:13+00:00" }, + { + "name": "doctrine/deprecations", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + }, + "time": "2024-01-30T19:34:25+00:00" + }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", @@ -530,16 +577,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "0.5.1", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", - "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", "shasum": "" }, "require": { @@ -547,13 +594,13 @@ }, "require-dev": { "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", "phpstan/phpstan": "^1.9.2", "phpstan/phpstan-deprecation-rules": "^1.0.0", "phpstan/phpstan-phpunit": "^1.2.2", "phpstan/phpstan-strict-rules": "^1.4.4", - "phpunit/phpunit": "^9.5.26 || ^8.5.31", - "theofidry/php-cs-fixer-config": "^1.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, "type": "library", @@ -579,7 +626,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" }, "funding": [ { @@ -587,20 +634,20 @@ "type": "github" } ], - "time": "2022-12-24T12:35:10+00:00" + "time": "2024-02-07T09:43:46+00:00" }, { "name": "netresearch/jsonmapper", - "version": "v4.0.0", + "version": "v4.4.1", "source": { "type": "git", "url": "https://github.com/cweiske/jsonmapper.git", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", - "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/132c75c7dd83e45353ebb9c6c9f591952995bbf0", + "reference": "132c75c7dd83e45353ebb9c6c9f591952995bbf0", "shasum": "" }, "require": { @@ -611,7 +658,7 @@ "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0 || ~10.0", "squizlabs/php_codesniffer": "~3.5" }, "type": "library", @@ -636,27 +683,27 @@ "support": { "email": "cweiske@cweiske.de", "issues": "https://github.com/cweiske/jsonmapper/issues", - "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" + "source": "https://github.com/cweiske/jsonmapper/tree/v4.4.1" }, - "time": "2020-12-01T19:48:11+00:00" + "time": "2024-01-31T06:18:54+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.1", + "version": "v4.19.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4e1b88d21c69391150ace211e9eaf05810858d0b", + "reference": "4e1b88d21c69391150ace211e9eaf05810858d0b", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.1" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", @@ -692,9 +739,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.19.1" }, - "time": "2022-09-04T07:30:47+00:00" + "time": "2024-03-17T08:10:35+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -808,24 +855,27 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.6.2", + "version": "1.8.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" + "reference": "153ae662783729388a584b4361f2545e4d841e3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", - "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/153ae662783729388a584b4361f2545e4d841e3c", + "reference": "153ae662783729388a584b4361f2545e4d841e3c", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" + "doctrine/deprecations": "^1.0", + "php": "^7.3 || ^8.0", + "phpdocumentor/reflection-common": "^2.0", + "phpstan/phpdoc-parser": "^1.13" }, "require-dev": { "ext-tokenizer": "*", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.1", @@ -857,9 +907,56 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.8.2" + }, + "time": "2024-02-23T11:10:43+00:00" + }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.27.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/86e4d5a4b036f8f0be1464522f4c6b584c452757", + "reference": "86e4d5a4b036f8f0be1464522f4c6b584c452757", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/annotations": "^2.0", + "nikic/php-parser": "^4.15", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" }, - "time": "2022-10-14T12:47:21+00:00" + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.27.0" + }, + "time": "2024-03-21T13:14:53+00:00" }, { "name": "psr/container", @@ -961,16 +1058,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "4.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", + "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", "shasum": "" }, "require": { @@ -1015,7 +1112,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" }, "funding": [ { @@ -1023,20 +1120,20 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2024-03-02T06:30:58+00:00" }, { "name": "spatie/array-to-xml", - "version": "3.1.5", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "13f76acef5362d15c71ae1ac6350cc3df5e25e43" + "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/13f76acef5362d15c71ae1ac6350cc3df5e25e43", - "reference": "13f76acef5362d15c71ae1ac6350cc3df5e25e43", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/c95fd4db94ec199f798d4b5b4a81757bd20d88ab", + "reference": "c95fd4db94ec199f798d4b5b4a81757bd20d88ab", "shasum": "" }, "require": { @@ -1074,7 +1171,7 @@ "xml" ], "support": { - "source": "https://github.com/spatie/array-to-xml/tree/3.1.5" + "source": "https://github.com/spatie/array-to-xml/tree/3.2.3" }, "funding": [ { @@ -1086,20 +1183,20 @@ "type": "github" } ], - "time": "2022-12-24T13:43:51+00:00" + "time": "2024-02-07T10:39:02+00:00" }, { "name": "symfony/console", - "version": "v5.4.15", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669" + "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ea59bb0edfaf9f28d18d8791410ee0355f317669", - "reference": "ea59bb0edfaf9f28d18d8791410ee0355f317669", + "url": "https://api.github.com/repos/symfony/console/zipball/39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", + "reference": "39f75d9d73d0c11952fdcecf4877b4d0f62a8f6e", "shasum": "" }, "require": { @@ -1164,12 +1261,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.15" + "source": "https://github.com/symfony/console/tree/v5.4.36" }, "funding": [ { @@ -1185,7 +1282,7 @@ "type": "tidelift" } ], - "time": "2022-10-26T21:41:52+00:00" + "time": "2024-02-20T16:33:57+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1256,16 +1353,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.21", + "version": "v5.4.35", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f" + "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", - "reference": "e75960b1bbfd2b8c9e483e0d74811d555ca3de9f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/5a553607d4ffbfa9c0ab62facadea296c9db7086", + "reference": "5a553607d4ffbfa9c0ab62facadea296c9db7086", "shasum": "" }, "require": { @@ -1300,7 +1397,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.21" + "source": "https://github.com/symfony/filesystem/tree/v5.4.35" }, "funding": [ { @@ -1316,20 +1413,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2024-01-23T13:51:25+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", + "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", "shasum": "" }, "require": { @@ -1343,9 +1440,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1382,7 +1476,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" }, "funding": [ { @@ -1398,20 +1492,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", "shasum": "" }, "require": { @@ -1422,9 +1516,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1463,7 +1554,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" }, "funding": [ { @@ -1479,20 +1570,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", + "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", "shasum": "" }, "require": { @@ -1503,9 +1594,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1547,7 +1635,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" }, "funding": [ { @@ -1563,20 +1651,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", "shasum": "" }, "require": { @@ -1590,9 +1678,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1630,7 +1715,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" }, "funding": [ { @@ -1646,20 +1731,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", + "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", "shasum": "" }, "require": { @@ -1667,9 +1752,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1709,7 +1791,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" }, "funding": [ { @@ -1725,20 +1807,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", "shasum": "" }, "require": { @@ -1746,9 +1828,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -1792,7 +1871,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" }, "funding": [ { @@ -1808,7 +1887,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2024-01-29T20:11:03+00:00" }, { "name": "symfony/service-contracts", @@ -1895,16 +1974,16 @@ }, { "name": "symfony/string", - "version": "v5.4.15", + "version": "v5.4.36", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" + "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", - "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "url": "https://api.github.com/repos/symfony/string/zipball/4e232c83622bd8cd32b794216aa29d0d266d353b", + "reference": "4e232c83622bd8cd32b794216aa29d0d266d353b", "shasum": "" }, "require": { @@ -1961,7 +2040,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.15" + "source": "https://github.com/symfony/string/tree/v5.4.36" }, "funding": [ { @@ -1977,20 +2056,20 @@ "type": "tidelift" } ], - "time": "2022-10-05T15:16:54+00:00" + "time": "2024-02-01T08:49:30+00:00" }, { "name": "vimeo/psalm", - "version": "5.9.0", + "version": "5.23.1", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "8b9ad1eb9e8b7d3101f949291da2b9f7767cd163" + "reference": "8471a896ccea3526b26d082f4461eeea467f10a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/8b9ad1eb9e8b7d3101f949291da2b9f7767cd163", - "reference": "8b9ad1eb9e8b7d3101f949291da2b9f7767cd163", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/8471a896ccea3526b26d082f4461eeea467f10a4", + "reference": "8471a896ccea3526b26d082f4461eeea467f10a4", "shasum": "" }, "require": { @@ -2009,14 +2088,17 @@ "ext-tokenizer": "*", "felixfbecker/advanced-json-rpc": "^3.1", "felixfbecker/language-server-protocol": "^1.5.2", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.14", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", - "sebastian/diff": "^4.0 || ^5.0", + "nikic/php-parser": "^4.16", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", - "symfony/console": "^4.1.6 || ^5.0 || ^6.0", - "symfony/filesystem": "^5.4 || ^6.0" + "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" + }, + "conflict": { + "nikic/php-parser": "4.17.0" }, "provide": { "psalm/psalm": "self.version" @@ -2035,7 +2117,7 @@ "psalm/plugin-phpunit": "^0.18", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.6", - "symfony/process": "^4.4 || ^5.0 || ^6.0" + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -2048,7 +2130,7 @@ "psalm-refactor", "psalter" ], - "type": "library", + "type": "project", "extra": { "branch-alias": { "dev-master": "5.x-dev", @@ -2080,10 +2162,11 @@ "static analysis" ], "support": { + "docs": "https://psalm.dev/docs", "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.9.0" + "source": "https://github.com/vimeo/psalm" }, - "time": "2023-03-29T21:38:21+00:00" + "time": "2024-03-11T20:33:46+00:00" }, { "name": "webmozart/assert", @@ -2155,5 +2238,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" }