aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/Activity/FavoriteProvider.php4
-rw-r--r--apps/files/lib/Activity/Helper.php2
-rw-r--r--apps/files/lib/Activity/Provider.php36
-rw-r--r--apps/files/lib/Command/Scan.php2
-rw-r--r--apps/files/lib/Helper.php2
5 files changed, 23 insertions, 23 deletions
diff --git a/apps/files/lib/Activity/FavoriteProvider.php b/apps/files/lib/Activity/FavoriteProvider.php
index bd794786d62..38d40fde047 100644
--- a/apps/files/lib/Activity/FavoriteProvider.php
+++ b/apps/files/lib/Activity/FavoriteProvider.php
@@ -105,7 +105,7 @@ class FavoriteProvider implements IProvider {
} else {
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg')));
}
- } else if ($event->getSubject() === self::SUBJECT_REMOVED) {
+ } elseif ($event->getSubject() === self::SUBJECT_REMOVED) {
$event->setType('unfavorite');
$event->setParsedSubject($this->l->t('Removed from favorites'));
if ($this->activityManager->getRequirePNG()) {
@@ -136,7 +136,7 @@ class FavoriteProvider implements IProvider {
} else {
$event->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg')));
}
- } else if ($event->getSubject() === self::SUBJECT_REMOVED) {
+ } elseif ($event->getSubject() === self::SUBJECT_REMOVED) {
$event->setType('unfavorite');
$subject = $this->l->t('You removed {file} from your favorites');
if ($this->activityManager->getRequirePNG()) {
diff --git a/apps/files/lib/Activity/Helper.php b/apps/files/lib/Activity/Helper.php
index fd043bed950..df9ed7af909 100644
--- a/apps/files/lib/Activity/Helper.php
+++ b/apps/files/lib/Activity/Helper.php
@@ -52,7 +52,7 @@ class Helper {
if (empty($favorites)) {
throw new \RuntimeException('No favorites', 1);
- } else if (isset($favorites[self::FAVORITE_LIMIT])) {
+ } elseif (isset($favorites[self::FAVORITE_LIMIT])) {
throw new \RuntimeException('Too many favorites', 2);
}
diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php
index c8d2794a181..a9a9c948c0b 100644
--- a/apps/files/lib/Activity/Provider.php
+++ b/apps/files/lib/Activity/Provider.php
@@ -143,19 +143,19 @@ class Provider implements IProvider {
if ($event->getSubject() === 'created_by') {
$subject = $this->l->t('Created by {user}');
$this->setIcon($event, 'add-color');
- } else if ($event->getSubject() === 'changed_by') {
+ } elseif ($event->getSubject() === 'changed_by') {
$subject = $this->l->t('Changed by {user}');
$this->setIcon($event, 'change');
- } else if ($event->getSubject() === 'deleted_by') {
+ } elseif ($event->getSubject() === 'deleted_by') {
$subject = $this->l->t('Deleted by {user}');
$this->setIcon($event, 'delete-color');
- } else if ($event->getSubject() === 'restored_by') {
+ } elseif ($event->getSubject() === 'restored_by') {
$subject = $this->l->t('Restored by {user}');
$this->setIcon($event, 'actions/history', 'core');
- } else if ($event->getSubject() === 'renamed_by') {
+ } elseif ($event->getSubject() === 'renamed_by') {
$subject = $this->l->t('Renamed by {user}');
$this->setIcon($event, 'change');
- } else if ($event->getSubject() === 'moved_by') {
+ } elseif ($event->getSubject() === 'moved_by') {
$subject = $this->l->t('Moved by {user}');
$this->setIcon($event, 'change');
} else {
@@ -189,55 +189,55 @@ class Provider implements IProvider {
$subject = $this->l->t('You created an encrypted file in {file}');
}
$this->setIcon($event, 'add-color');
- } else if ($event->getSubject() === 'created_by') {
+ } elseif ($event->getSubject() === 'created_by') {
$subject = $this->l->t('{user} created {file}');
if ($this->fileIsEncrypted) {
$subject = $this->l->t('{user} created an encrypted file in {file}');
}
$this->setIcon($event, 'add-color');
- } else if ($event->getSubject() === 'created_public') {
+ } elseif ($event->getSubject() === 'created_public') {
$subject = $this->l->t('{file} was created in a public folder');
$this->setIcon($event, 'add-color');
- } else if ($event->getSubject() === 'changed_self') {
+ } elseif ($event->getSubject() === 'changed_self') {
$subject = $this->l->t('You changed {file}');
if ($this->fileIsEncrypted) {
$subject = $this->l->t('You changed an encrypted file in {file}');
}
$this->setIcon($event, 'change');
- } else if ($event->getSubject() === 'changed_by') {
+ } elseif ($event->getSubject() === 'changed_by') {
$subject = $this->l->t('{user} changed {file}');
if ($this->fileIsEncrypted) {
$subject = $this->l->t('{user} changed an encrypted file in {file}');
}
$this->setIcon($event, 'change');
- } else if ($event->getSubject() === 'deleted_self') {
+ } elseif ($event->getSubject() === 'deleted_self') {
$subject = $this->l->t('You deleted {file}');
if ($this->fileIsEncrypted) {
$subject = $this->l->t('You deleted an encrypted file in {file}');
}
$this->setIcon($event, 'delete-color');
- } else if ($event->getSubject() === 'deleted_by') {
+ } elseif ($event->getSubject() === 'deleted_by') {
$subject = $this->l->t('{user} deleted {file}');
if ($this->fileIsEncrypted) {
$subject = $this->l->t('{user} deleted an encrypted file in {file}');
}
$this->setIcon($event, 'delete-color');
- } else if ($event->getSubject() === 'restored_self') {
+ } elseif ($event->getSubject() === 'restored_self') {
$subject = $this->l->t('You restored {file}');
$this->setIcon($event, 'actions/history', 'core');
- } else if ($event->getSubject() === 'restored_by') {
+ } elseif ($event->getSubject() === 'restored_by') {
$subject = $this->l->t('{user} restored {file}');
$this->setIcon($event, 'actions/history', 'core');
- } else if ($event->getSubject() === 'renamed_self') {
+ } elseif ($event->getSubject() === 'renamed_self') {
$subject = $this->l->t('You renamed {oldfile} to {newfile}');
$this->setIcon($event, 'change');
- } else if ($event->getSubject() === 'renamed_by') {
+ } elseif ($event->getSubject() === 'renamed_by') {
$subject = $this->l->t('{user} renamed {oldfile} to {newfile}');
$this->setIcon($event, 'change');
- } else if ($event->getSubject() === 'moved_self') {
+ } elseif ($event->getSubject() === 'moved_self') {
$subject = $this->l->t('You moved {oldfile} to {newfile}');
$this->setIcon($event, 'change');
- } else if ($event->getSubject() === 'moved_by') {
+ } elseif ($event->getSubject() === 'moved_by') {
$subject = $this->l->t('{user} moved {oldfile} to {newfile}');
$this->setIcon($event, 'change');
} else {
@@ -348,7 +348,7 @@ class Provider implements IProvider {
if (is_array($parameter)) {
$path = reset($parameter);
$id = (string) key($parameter);
- } else if ($event !== null) {
+ } elseif ($event !== null) {
// Legacy from before ownCloud 8.2
$path = $parameter;
$id = $event->getObjectId();
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php
index f628ed2e0e0..024899e5f5c 100644
--- a/apps/files/lib/Command/Scan.php
+++ b/apps/files/lib/Command/Scan.php
@@ -175,7 +175,7 @@ class Scan extends Base {
$inputPath = '/' . trim($inputPath, '/');
list(, $user,) = explode('/', $inputPath, 3);
$users = [$user];
- } else if ($input->getOption('all')) {
+ } elseif ($input->getOption('all')) {
$users = $this->userManager->search('');
} else {
$users = $input->getArgument('user_id');
diff --git a/apps/files/lib/Helper.php b/apps/files/lib/Helper.php
index 325ff89e6c2..b3a62aee1c5 100644
--- a/apps/files/lib/Helper.php
+++ b/apps/files/lib/Helper.php
@@ -260,7 +260,7 @@ class Helper {
$sortFunc = 'compareFileNames';
if ($sortAttribute === 'mtime') {
$sortFunc = 'compareTimestamp';
- } else if ($sortAttribute === 'size') {
+ } elseif ($sortAttribute === 'size') {
$sortFunc = 'compareSize';
}
usort($files, [Helper::class, $sortFunc]);