aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-25 22:20:10 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-25 22:20:10 +0100
commit7800a9bc24d50d3eed40f8b1d40236a262b4f8ef (patch)
tree8d439d4743df537769ea2bfd97ffa42a9041ceec /apps
parentb9bbb894f8b01e000bb5e3a8a82db7bebad3ea00 (diff)
downloadnextcloud-server-7800a9bc24d50d3eed40f8b1d40236a262b4f8ef.tar.gz
nextcloud-server-7800a9bc24d50d3eed40f8b1d40236a262b4f8ef.zip
Fix array method usages with a proper call
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/comments/lib/Activity/Listener.php2
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php2
-rw-r--r--apps/files_sharing/lib/Migration/OwncloudGuestShareType.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/apps/comments/lib/Activity/Listener.php b/apps/comments/lib/Activity/Listener.php
index 76af565cf15..1dec28c8250 100644
--- a/apps/comments/lib/Activity/Listener.php
+++ b/apps/comments/lib/Activity/Listener.php
@@ -77,7 +77,7 @@ class Listener {
*/
public function commentEvent(CommentsEvent $event) {
if ($event->getComment()->getObjectType() !== 'files'
- || !in_array($event->getEvent(), [CommentsEvent::EVENT_ADD])
+ || $event->getEvent() !== CommentsEvent::EVENT_ADD
|| !$this->appManager->isInstalled('activity')) {
// Comment not for file, not adding a comment or no activity-app enabled (save the energy)
return;
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index 169bf6ff6a5..a936cb6aeba 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -2261,7 +2261,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$query->execute();
}
- if (in_array($property->name, array_keys(self::$indexParameters))) {
+ if (array_key_exists($property->name, self::$indexParameters)) {
$parameters = $property->parameters();
$indexedParametersForProperty = self::$indexParameters[$property->name];
diff --git a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
index 07f739fb702..33812c5a43e 100644
--- a/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
+++ b/apps/files_sharing/lib/Migration/OwncloudGuestShareType.php
@@ -75,7 +75,7 @@ class OwncloudGuestShareType implements IRepairStep {
protected function shouldRun() {
$appVersion = $this->config->getAppValue('files_sharing', 'installed_version', '0.0.0');
- return in_array($appVersion, ['0.10.0']) ||
+ return $appVersion === '0.10.0' ||
$this->config->getAppValue('core', 'vendor', '') === 'owncloud';
}