Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Repair/ClearGeneratedAvatarCache.php')
-rw-r--r--lib/private/Repair/ClearGeneratedAvatarCache.php20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/private/Repair/ClearGeneratedAvatarCache.php b/lib/private/Repair/ClearGeneratedAvatarCache.php
index 314299a0528..1c1be4f7893 100644
--- a/lib/private/Repair/ClearGeneratedAvatarCache.php
+++ b/lib/private/Repair/ClearGeneratedAvatarCache.php
@@ -30,35 +30,29 @@ use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
class ClearGeneratedAvatarCache implements IRepairStep {
-
- /** @var AvatarManager */
- protected $avatarManager;
-
- /** @var IConfig */
- private $config;
+ protected AvatarManager $avatarManager;
+ private IConfig $config;
public function __construct(IConfig $config, AvatarManager $avatarManager) {
$this->config = $config;
$this->avatarManager = $avatarManager;
}
- public function getName() {
+ public function getName(): string {
return 'Clear every generated avatar on major updates';
}
/**
* Check if this repair step should run
- *
- * @return boolean
*/
- private function shouldRun() {
+ private function shouldRun(): bool {
$versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0');
- // was added to 15.0.0.4
- return version_compare($versionFromBeforeUpdate, '15.0.0.4', '<=');
+ // was added to 25.0.0.10
+ return version_compare($versionFromBeforeUpdate, '25.0.0.10', '<=');
}
- public function run(IOutput $output) {
+ public function run(IOutput $output): void {
if ($this->shouldRun()) {
try {
$this->avatarManager->clearCachedAvatars();