summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-10 19:40:19 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-10 19:40:19 +0100
commit4d5830c4aaac0b7cdd7f7f00e12703f66d087d9d (patch)
tree08fd49d2b575fb03122a1cbd95789abe0e1e3f41 /apps/admin_audit
parentf08bc1bc6fb16d2c199c20109f9501aef14e2511 (diff)
downloadnextcloud-server-4d5830c4aaac0b7cdd7f7f00e12703f66d087d9d.tar.gz
nextcloud-server-4d5830c4aaac0b7cdd7f7f00e12703f66d087d9d.zip
Make admin_audit strict
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/admin_audit')
-rw-r--r--apps/admin_audit/appinfo/app.php1
-rw-r--r--apps/admin_audit/lib/Actions/Action.php5
-rw-r--r--apps/admin_audit/lib/Actions/AppManagement.php7
-rw-r--r--apps/admin_audit/lib/Actions/Auth.php1
-rw-r--r--apps/admin_audit/lib/Actions/Console.php3
-rw-r--r--apps/admin_audit/lib/Actions/Files.php1
-rw-r--r--apps/admin_audit/lib/Actions/GroupManagement.php1
-rw-r--r--apps/admin_audit/lib/Actions/Sharing.php1
-rw-r--r--apps/admin_audit/lib/Actions/Trashbin.php5
-rw-r--r--apps/admin_audit/lib/Actions/UserManagement.php1
-rw-r--r--apps/admin_audit/lib/Actions/Versions.php5
-rw-r--r--apps/admin_audit/lib/AppInfo/Application.php1
12 files changed, 22 insertions, 10 deletions
diff --git a/apps/admin_audit/appinfo/app.php b/apps/admin_audit/appinfo/app.php
index 6959c6afa76..5cee5c3db70 100644
--- a/apps/admin_audit/appinfo/app.php
+++ b/apps/admin_audit/appinfo/app.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org>
* @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
diff --git a/apps/admin_audit/lib/Actions/Action.php b/apps/admin_audit/lib/Actions/Action.php
index 9ca85363250..0961a609b8c 100644
--- a/apps/admin_audit/lib/Actions/Action.php
+++ b/apps/admin_audit/lib/Actions/Action.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
@@ -45,10 +46,10 @@ class Action {
* @param array $elements
* @param bool $obfuscateParameters
*/
- public function log($text,
+ public function log(string $text,
array $params,
array $elements,
- $obfuscateParameters = false) {
+ bool $obfuscateParameters = false) {
foreach($elements as $element) {
if(!isset($params[$element])) {
if ($obfuscateParameters) {
diff --git a/apps/admin_audit/lib/Actions/AppManagement.php b/apps/admin_audit/lib/Actions/AppManagement.php
index e12ff2f694e..7831c850a89 100644
--- a/apps/admin_audit/lib/Actions/AppManagement.php
+++ b/apps/admin_audit/lib/Actions/AppManagement.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*
@@ -28,7 +29,7 @@ class AppManagement extends Action {
/**
* @param string $appName
*/
- public function enableApp($appName) {
+ public function enableApp(string $appName) {
$this->log('App "%s" enabled',
['app' => $appName],
['app']
@@ -39,7 +40,7 @@ class AppManagement extends Action {
* @param string $appName
* @param string[] $groups
*/
- public function enableAppForGroups($appName, array $groups) {
+ public function enableAppForGroups(string $appName, array $groups) {
$this->log('App "%s" enabled for groups: %s',
['app' => $appName, 'groups' => implode(', ', $groups)],
['app', 'groups']
@@ -49,7 +50,7 @@ class AppManagement extends Action {
/**
* @param string $appName
*/
- public function disableApp($appName) {
+ public function disableApp(string $appName) {
$this->log('App "%s" disabled',
['app' => $appName],
['app']
diff --git a/apps/admin_audit/lib/Actions/Auth.php b/apps/admin_audit/lib/Actions/Auth.php
index 7a2a3b42e15..3f302d9664b 100644
--- a/apps/admin_audit/lib/Actions/Auth.php
+++ b/apps/admin_audit/lib/Actions/Auth.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
diff --git a/apps/admin_audit/lib/Actions/Console.php b/apps/admin_audit/lib/Actions/Console.php
index 20553ef23d0..8b25f9b3860 100644
--- a/apps/admin_audit/lib/Actions/Console.php
+++ b/apps/admin_audit/lib/Actions/Console.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*
@@ -28,7 +29,7 @@ class Console extends Action {
/**
* @param $arguments
*/
- public function runCommand($arguments) {
+ public function runCommand(array $arguments) {
if ($arguments[1] === '_completion') {
// Don't log autocompletion
return;
diff --git a/apps/admin_audit/lib/Actions/Files.php b/apps/admin_audit/lib/Actions/Files.php
index e2d60c448db..5f72a997396 100644
--- a/apps/admin_audit/lib/Actions/Files.php
+++ b/apps/admin_audit/lib/Actions/Files.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
diff --git a/apps/admin_audit/lib/Actions/GroupManagement.php b/apps/admin_audit/lib/Actions/GroupManagement.php
index 6872ed2894c..e5e1f183a29 100644
--- a/apps/admin_audit/lib/Actions/GroupManagement.php
+++ b/apps/admin_audit/lib/Actions/GroupManagement.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org>
*
diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php
index 689ec44f6c4..b66c9f50eb8 100644
--- a/apps/admin_audit/lib/Actions/Sharing.php
+++ b/apps/admin_audit/lib/Actions/Sharing.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
diff --git a/apps/admin_audit/lib/Actions/Trashbin.php b/apps/admin_audit/lib/Actions/Trashbin.php
index c2b88589ab8..1ea2e696288 100644
--- a/apps/admin_audit/lib/Actions/Trashbin.php
+++ b/apps/admin_audit/lib/Actions/Trashbin.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org>
*
@@ -27,13 +28,13 @@ namespace OCA\AdminAudit\Actions;
class Trashbin extends Action {
- public function delete($params) {
+ public function delete(array $params) {
$this->log('File "%s" deleted from trash bin.',
['path' => $params['path']], ['path']
);
}
- public function restore($params) {
+ public function restore(array $params) {
$this->log('File "%s" restored from trash bin.',
['path' => $params['filePath']], ['path']
);
diff --git a/apps/admin_audit/lib/Actions/UserManagement.php b/apps/admin_audit/lib/Actions/UserManagement.php
index 9d0b237e303..45250d4e708 100644
--- a/apps/admin_audit/lib/Actions/UserManagement.php
+++ b/apps/admin_audit/lib/Actions/UserManagement.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
diff --git a/apps/admin_audit/lib/Actions/Versions.php b/apps/admin_audit/lib/Actions/Versions.php
index 5d26dcc3d77..b012927f18a 100644
--- a/apps/admin_audit/lib/Actions/Versions.php
+++ b/apps/admin_audit/lib/Actions/Versions.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Bjoern Schiessle <bjoern@schiessle.org>
*
@@ -27,7 +28,7 @@ namespace OCA\AdminAudit\Actions;
class Versions extends Action {
- public function rollback($params) {
+ public function rollback(array $params) {
$this->log('Version "%s" of "%s" was restored.',
[
'version' => $params['revision'],
@@ -37,7 +38,7 @@ class Versions extends Action {
);
}
- public function delete($params) {
+ public function delete(array $params) {
$this->log('Version "%s" was deleted.',
['path' => $params['path']],
['path']
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php
index 03423121eb4..5634a4a67b5 100644
--- a/apps/admin_audit/lib/AppInfo/Application.php
+++ b/apps/admin_audit/lib/AppInfo/Application.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*