Skip to content

Commit

Permalink
fixup! Bump vimeo/psalm from 4.2.1 to 4.3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Dec 28, 2020
1 parent 484b32d commit 3c37444
Show file tree
Hide file tree
Showing 23 changed files with 140 additions and 131 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function update(
} catch (NotFoundException $e) {
return new DataResponse(
[
'message' => (string)$this->l10n->t('Storage with ID "%d" not found', [$id])
'message' => $this->l10n->t('Storage with ID "%d" not found', [$id])
],
Http::STATUS_NOT_FOUND
);
Expand Down
4 changes: 2 additions & 2 deletions apps/settings/lib/Controller/CheckSetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ private function isUsedTlsLibOutdated() {
return '';
}

$features = (string)$this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
$features = $this->l10n->t('installing and updating apps via the app store or Federated Cloud Sharing');
if (!$this->config->getSystemValue('appstoreenabled', true)) {
$features = (string)$this->l10n->t('Federated Cloud Sharing');
$features = $this->l10n->t('Federated Cloud Sharing');
}

// Check if at least OpenSSL after 1.01d or 1.0.2b
Expand Down
16 changes: 10 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/Migrations/Version13000Date20170718121200.php
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array
$insert->setParameter('propertypath', (string) $row['propertypath'])
->setParameter('propertyname', (string) $row['propertyname'])
->setParameter('propertyvalue', (string) $row['propertyvalue'])
->setParameter('userid', (string) ($match[2] ?? ''));
->setParameter('userid', ($match[2] ?? ''));
$insert->execute();
}
}
Expand Down
63 changes: 31 additions & 32 deletions core/ajax/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// need to send an initial message to force-init the event source,
// which will then trigger its own CSRF check and produces its own CSRF error
// message
$eventSource->send('success', (string)$l->t('Preparing update'));
$eventSource->send('success', $l->t('Preparing update'));

class FeedBackHandler {
/** @var integer */
Expand Down Expand Up @@ -83,23 +83,23 @@ public function handleRepairFeedback($event) {
if (empty($desc)) {
$desc = $this->currentStep;
}
$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
$this->eventSource->send('success', $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $desc]));
break;
case '\OC\Repair::finishProgress':
$this->progressStateMax = $this->progressStateStep;
$this->eventSource->send('success', (string)$this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
$this->eventSource->send('success', $this->l10n->t('[%d / %d]: %s', [$this->progressStateStep, $this->progressStateMax, $this->currentStep]));
break;
case '\OC\Repair::step':
$this->eventSource->send('success', (string)$this->l10n->t('Repair step:') . ' ' . $event->getArgument(0));
$this->eventSource->send('success', $this->l10n->t('Repair step:') . ' ' . $event->getArgument(0));
break;
case '\OC\Repair::info':
$this->eventSource->send('success', (string)$this->l10n->t('Repair info:') . ' ' . $event->getArgument(0));
$this->eventSource->send('success', $this->l10n->t('Repair info:') . ' ' . $event->getArgument(0));
break;
case '\OC\Repair::warning':
$this->eventSource->send('notice', (string)$this->l10n->t('Repair warning:') . ' ' . $event->getArgument(0));
$this->eventSource->send('notice', $this->l10n->t('Repair warning:') . ' ' . $event->getArgument(0));
break;
case '\OC\Repair::error':
$this->eventSource->send('notice', (string)$this->l10n->t('Repair error:') . ' ' . $event->getArgument(0));
$this->eventSource->send('notice', $this->l10n->t('Repair error:') . ' ' . $event->getArgument(0));
break;
}
}
Expand All @@ -108,7 +108,7 @@ public function handleRepairFeedback($event) {
if (\OCP\Util::needUpgrade()) {
$config = \OC::$server->getSystemConfig();
if ($config->getValue('upgrade.disable-web', false)) {
$eventSource->send('failure', (string)$l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
$eventSource->send('failure', $l->t('Please use the command line updater because automatic updating is disabled in the config.php.'));
$eventSource->close();
exit();
}
Expand All @@ -130,12 +130,12 @@ public function handleRepairFeedback($event) {
$dispatcher = \OC::$server->getEventDispatcher();
$dispatcher->addListener('\OC\DB\Migrator::executeSql', function ($event) use ($eventSource, $l) {
if ($event instanceof GenericEvent) {
$eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
$eventSource->send('success', $l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()]));
}
});
$dispatcher->addListener('\OC\DB\Migrator::checkTable', function ($event) use ($eventSource, $l) {
if ($event instanceof GenericEvent) {
$eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
$eventSource->send('success', $l->t('[%d / %d]: Checking table %s', [$event[0], $event[1], $event->getSubject()]));
}
});
$feedBack = new FeedBackHandler($eventSource, $l);
Expand All @@ -148,46 +148,46 @@ public function handleRepairFeedback($event) {
$dispatcher->addListener('\OC\Repair::error', [$feedBack, 'handleRepairFeedback']);

$updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Turned on maintenance mode'));
$eventSource->send('success', $l->t('Turned on maintenance mode'));
});
$updater->listen('\OC\Updater', 'maintenanceDisabled', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Turned off maintenance mode'));
$eventSource->send('success', $l->t('Turned off maintenance mode'));
});
$updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Maintenance mode is kept active'));
$eventSource->send('success', $l->t('Maintenance mode is kept active'));
});
$updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Updating database schema'));
$eventSource->send('success', $l->t('Updating database schema'));
});
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Updated database'));
$eventSource->send('success', $l->t('Updated database'));
});
$updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
$eventSource->send('success', $l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
});
$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checked database schema update'));
$eventSource->send('success', $l->t('Checked database schema update'));
});
$updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checking updates of apps'));
$eventSource->send('success', $l->t('Checking updates of apps'));
});
$updater->listen('\OC\Updater', 'checkAppStoreAppBefore', function ($app) use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checking for update of app "%s" in appstore', [$app]));
$eventSource->send('success', $l->t('Checking for update of app "%s" in appstore', [$app]));
});
$updater->listen('\OC\Updater', 'upgradeAppStoreApp', function ($app) use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Update app "%s" from appstore', [$app]));
$eventSource->send('success', $l->t('Update app "%s" from appstore', [$app]));
});
$updater->listen('\OC\Updater', 'checkAppStoreApp', function ($app) use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checked for update of app "%s" in appstore', [$app]));
$eventSource->send('success', $l->t('Checked for update of app "%s" in appstore', [$app]));
});
$updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
$eventSource->send('success', $l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
});
$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checked database schema update for apps'));
$eventSource->send('success', $l->t('Checked database schema update for apps'));
});
$updater->listen('\OC\Updater', 'appUpgrade', function ($app, $version) use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Updated "%1$s" to %2$s', [$app, $version]));
$eventSource->send('success', $l->t('Updated "%1$s" to %2$s', [$app, $version]));
});
$updater->listen('\OC\Updater', 'incompatibleAppDisabled', function ($app) use (&$incompatibleApps) {
$incompatibleApps[] = $app;
Expand All @@ -198,16 +198,16 @@ public function handleRepairFeedback($event) {
$config->setSystemValue('maintenance', false);
});
$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Set log level to debug'));
$eventSource->send('success', $l->t('Set log level to debug'));
});
$updater->listen('\OC\Updater', 'resetLogLevel', function ($logLevel, $logLevelName) use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Reset log level'));
$eventSource->send('success', $l->t('Reset log level'));
});
$updater->listen('\OC\Updater', 'startCheckCodeIntegrity', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Starting code integrity check'));
$eventSource->send('success', $l->t('Starting code integrity check'));
});
$updater->listen('\OC\Updater', 'finishedCheckCodeIntegrity', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Finished code integrity check'));
$eventSource->send('success', $l->t('Finished code integrity check'));
});

try {
Expand All @@ -224,15 +224,14 @@ public function handleRepairFeedback($event) {

$disabledApps = [];
foreach ($incompatibleApps as $app) {
$disabledApps[$app] = (string) $l->t('%s (incompatible)', [$app]);
$disabledApps[$app] = $l->t('%s (incompatible)', [$app]);
}

if (!empty($disabledApps)) {
$eventSource->send('notice',
(string)$l->t('The following apps have been disabled: %s', [implode(', ', $disabledApps)]));
$eventSource->send('notice', $l->t('The following apps have been disabled: %s', [implode(', ', $disabledApps)]));
}
} else {
$eventSource->send('notice', (string)$l->t('Already up to date'));
$eventSource->send('notice', $l->t('Already up to date'));
}

$eventSource->send('done', '');
Expand Down
6 changes: 5 additions & 1 deletion lib/composer/composer/installed.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
[]
{
"packages": [],
"dev": false,
"dev-package-names": []
}
2 changes: 1 addition & 1 deletion lib/private/App/AppStore/Bundles/EducationBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class EducationBundle extends Bundle {
* {@inheritDoc}
*/
public function getName() {
return (string)$this->l10n->t('Education Edition');
return $this->l10n->t('Education Edition');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/private/App/AppStore/Bundles/GroupwareBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GroupwareBundle extends Bundle {
* {@inheritDoc}
*/
public function getName() {
return (string)$this->l10n->t('Groupware bundle');
return $this->l10n->t('Groupware bundle');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/private/App/AppStore/Bundles/SocialSharingBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SocialSharingBundle extends Bundle {
* {@inheritDoc}
*/
public function getName() {
return (string)$this->l10n->t('Social sharing bundle');
return $this->l10n->t('Social sharing bundle');
}

/**
Expand Down
18 changes: 9 additions & 9 deletions lib/private/App/DependencyAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,19 @@ private function analyzePhpVersion(array $dependencies) {
if (isset($dependencies['php']['@attributes']['min-version'])) {
$minVersion = $dependencies['php']['@attributes']['min-version'];
if ($this->compareSmaller($this->platform->getPhpVersion(), $minVersion)) {
$missing[] = (string)$this->l->t('PHP %s or higher is required.', [$minVersion]);
$missing[] = $this->l->t('PHP %s or higher is required.', [$minVersion]);
}
}
if (isset($dependencies['php']['@attributes']['max-version'])) {
$maxVersion = $dependencies['php']['@attributes']['max-version'];
if ($this->compareBigger($this->platform->getPhpVersion(), $maxVersion)) {
$missing[] = (string)$this->l->t('PHP with a version lower than %s is required.', [$maxVersion]);
$missing[] = $this->l->t('PHP with a version lower than %s is required.', [$maxVersion]);
}
}
if (isset($dependencies['php']['@attributes']['min-int-size'])) {
$intSize = $dependencies['php']['@attributes']['min-int-size'];
if ($intSize > $this->platform->getIntSize() * 8) {
$missing[] = (string)$this->l->t('%sbit or higher PHP required.', [$intSize]);
$missing[] = $this->l->t('%sbit or higher PHP required.', [$intSize]);
}
}
return $missing;
Expand All @@ -194,7 +194,7 @@ private function analyzeArchitecture(array $dependencies) {
}, $supportedArchitectures);
$currentArchitecture = $this->platform->getArchitecture();
if (!in_array($currentArchitecture, $supportedArchitectures, true)) {
$missing[] = (string)$this->l->t('The following architectures are supported: %s', [implode(', ', $supportedArchitectures)]);
$missing[] = $this->l->t('The following architectures are supported: %s', [implode(', ', $supportedArchitectures)]);
}
return $missing;
}
Expand All @@ -221,7 +221,7 @@ private function analyzeDatabases(array $dependencies) {
}, $supportedDatabases);
$currentDatabase = $this->platform->getDatabase();
if (!in_array($currentDatabase, $supportedDatabases)) {
$missing[] = (string)$this->l->t('The following databases are supported: %s', [implode(', ', $supportedDatabases)]);
$missing[] = $this->l->t('The following databases are supported: %s', [implode(', ', $supportedDatabases)]);
}
return $missing;
}
Expand Down Expand Up @@ -250,7 +250,7 @@ private function analyzeCommands(array $dependencies) {
}
$commandName = $this->getValue($command);
if (!$this->platform->isCommandKnown($commandName)) {
$missing[] = (string)$this->l->t('The command line tool %s could not be found', [$commandName]);
$missing[] = $this->l->t('The command line tool %s could not be found', [$commandName]);
}
}
return $missing;
Expand Down Expand Up @@ -324,7 +324,7 @@ private function analyzeOS(array $dependencies) {
}
$currentOS = $this->platform->getOS();
if (!in_array($currentOS, $oss)) {
$missing[] = (string)$this->l->t('The following platforms are supported: %s', [implode(', ', $oss)]);
$missing[] = $this->l->t('The following platforms are supported: %s', [implode(', ', $oss)]);
}
return $missing;
}
Expand All @@ -350,12 +350,12 @@ private function analyzeOC(array $dependencies, array $appInfo, bool $ignoreMax)

if (!is_null($minVersion)) {
if ($this->compareSmaller($this->platform->getOcVersion(), $minVersion)) {
$missing[] = (string)$this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
$missing[] = $this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
}
}
if (!$ignoreMax && !is_null($maxVersion)) {
if ($this->compareBigger($this->platform->getOcVersion(), $maxVersion)) {
$missing[] = (string)$this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
$missing[] = $this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
}
}
return $missing;
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Collaboration/Collaborators/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function search($search, array $shareTypes, $lookup, $limit, $offset) {
$searchResult->unsetResult($emailType);
}

return [$searchResult->asArray(), (bool)$hasMoreResults];
return [$searchResult->asArray(), $hasMoreResults];
}

public function registerPlugin(array $pluginInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public function literal($input, $type = null) {
* @return string
*/
public function castColumn($column, $type) {
return new QueryFunction(
return (string) new QueryFunction(
$this->helper->quoteColumnName($column)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class PgSqlExpressionBuilder extends ExpressionBuilder {
public function castColumn($column, $type) {
switch ($type) {
case IQueryBuilder::PARAM_INT:
return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS INT)');
return (string) new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS INT)');
case IQueryBuilder::PARAM_STR:
return new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS TEXT)');
return (string) new QueryFunction('CAST(' . $this->helper->quoteColumnName($column) . ' AS TEXT)');
default:
return parent::castColumn($column, $type);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/Wrapper/Encoding.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function __construct($parameters) {
* @return bool true if the string is all ASCII, false otherwise
*/
private function isAscii($str) {
return (bool) !preg_match('/[\\x80-\\xff]+/', $str);
return !preg_match('/[\\x80-\\xff]+/', $str);
}

/**
Expand Down
Loading

0 comments on commit 3c37444

Please sign in to comment.