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

github.com/nextcloud/files_downloadactivity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-06-28 16:38:29 +0300
committerJoas Schilling <coding@schilljs.com>2021-06-28 16:38:51 +0300
commit2482f99fa20602061e985e40f965427f3f7cbd67 (patch)
tree6c30c5d0a98be6cdef55e381b65d6cae89a05cbd
parent547da76a00a7095aa0f6ad6d4670f6019ad4db19 (diff)
Fix CS
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rwxr-xr-xlib/Activity/Listener.php2
-rw-r--r--lib/Activity/Provider.php8
-rw-r--r--lib/Activity/Setting.php2
-rw-r--r--lib/AppInfo/Application.php1
-rw-r--r--tests/AppInfo/ApplicationTest.php1
-rw-r--r--tests/bootstrap.php2
6 files changed, 6 insertions, 10 deletions
diff --git a/lib/Activity/Listener.php b/lib/Activity/Listener.php
index 1d4d2b1..84ddbfe 100755
--- a/lib/Activity/Listener.php
+++ b/lib/Activity/Listener.php
@@ -96,7 +96,7 @@ class Listener {
$client = 'web';
if ($this->request->isUserAgent([IRequest::USER_AGENT_CLIENT_DESKTOP])) {
$client = 'desktop';
- } else if ($this->request->isUserAgent([IRequest::USER_AGENT_CLIENT_ANDROID, IRequest::USER_AGENT_CLIENT_IOS])) {
+ } elseif ($this->request->isUserAgent([IRequest::USER_AGENT_CLIENT_ANDROID, IRequest::USER_AGENT_CLIENT_IOS])) {
$client = 'mobile';
}
$subjectParams = [[$fileId => $filePath], $this->currentUser->getUserIdentifier(), $client];
diff --git a/lib/Activity/Provider.php b/lib/Activity/Provider.php
index c568867..91c7619 100644
--- a/lib/Activity/Provider.php
+++ b/lib/Activity/Provider.php
@@ -59,8 +59,8 @@ class Provider implements IProvider {
/** @var string */
protected $lastType = '';
- const SUBJECT_SHARED_FILE_DOWNLOADED = 'shared_file_downloaded';
- const SUBJECT_SHARED_FOLDER_DOWNLOADED = 'shared_folder_downloaded';
+ public const SUBJECT_SHARED_FILE_DOWNLOADED = 'shared_file_downloaded';
+ public const SUBJECT_SHARED_FOLDER_DOWNLOADED = 'shared_folder_downloaded';
/**
* @param IFactory $languageFactory
@@ -121,7 +121,7 @@ class Provider implements IProvider {
if ($params[2] === 'desktop') {
$subject = $this->l->t('Downloaded by {actor} (via desktop)');
- } else if ($params[2] === 'mobile') {
+ } elseif ($params[2] === 'mobile') {
$subject = $this->l->t('Downloaded by {actor} (via app)');
} else {
$subject = $this->l->t('Downloaded by {actor} (via browser)');
@@ -150,7 +150,7 @@ class Provider implements IProvider {
if ($params[2] === 'desktop') {
$subject = $this->l->t('Shared file {file} was downloaded by {actor} via the desktop client');
- } else if ($params[2] === 'mobile') {
+ } elseif ($params[2] === 'mobile') {
$subject = $this->l->t('Shared file {file} was downloaded by {actor} via the mobile app');
} else {
$subject = $this->l->t('Shared file {file} was downloaded by {actor} via the browser');
diff --git a/lib/Activity/Setting.php b/lib/Activity/Setting.php
index 5c6d84b..16905f7 100644
--- a/lib/Activity/Setting.php
+++ b/lib/Activity/Setting.php
@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace OCA\FilesDownloadActivity\Activity;
-
use OCP\Activity\ISetting;
use OCP\IL10N;
@@ -97,4 +96,3 @@ class Setting implements ISetting {
return false;
}
}
-
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 62c8466..ee210d4 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -34,7 +34,6 @@ use OCP\Util;
use Symfony\Component\EventDispatcher\GenericEvent;
class Application extends App implements IBootstrap {
-
public const APP_ID = 'files_downloadactivity';
public function __construct() {
diff --git a/tests/AppInfo/ApplicationTest.php b/tests/AppInfo/ApplicationTest.php
index 31a9591..3708d4f 100644
--- a/tests/AppInfo/ApplicationTest.php
+++ b/tests/AppInfo/ApplicationTest.php
@@ -21,7 +21,6 @@
namespace OCA\FilesDownloadActivity\Tests\AppInfo;
-
use OCA\FilesDownloadActivity\Activity\Listener;
use OCA\FilesDownloadActivity\Activity\Provider;
use OCA\FilesDownloadActivity\Activity\Setting;
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 5c216ab..3d10355 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -31,7 +31,7 @@ require_once __DIR__.'/../../../lib/base.php';
// Fix for "Autoload path not allowed: .../files_downloadactivity/tests/testcase.php"
\OC_App::loadApp('files_downloadactivity');
-if(!class_exists('\PHPUnit\Framework\TestCase')) {
+if (!class_exists('\PHPUnit\Framework\TestCase')) {
require_once('PHPUnit/Autoload.php');
}