Sfoglia il codice sorgente

Make admin_audit strict

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v14.0.0beta1
Roeland Jago Douma 6 anni fa
parent
commit
4d5830c4aa
Nessun account collegato all'indirizzo email del committer

+ 1
- 0
apps/admin_audit/appinfo/app.php Vedi File

@@ -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>

+ 3
- 2
apps/admin_audit/lib/Actions/Action.php Vedi File

@@ -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) {

+ 4
- 3
apps/admin_audit/lib/Actions/AppManagement.php Vedi File

@@ -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']

+ 1
- 0
apps/admin_audit/lib/Actions/Auth.php Vedi File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*

+ 2
- 1
apps/admin_audit/lib/Actions/Console.php Vedi File

@@ -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;

+ 1
- 0
apps/admin_audit/lib/Actions/Files.php Vedi File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*

+ 1
- 0
apps/admin_audit/lib/Actions/GroupManagement.php Vedi File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org>
*

+ 1
- 0
apps/admin_audit/lib/Actions/Sharing.php Vedi File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*

+ 3
- 2
apps/admin_audit/lib/Actions/Trashbin.php Vedi File

@@ -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']
);

+ 1
- 0
apps/admin_audit/lib/Actions/UserManagement.php Vedi File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*

+ 3
- 2
apps/admin_audit/lib/Actions/Versions.php Vedi File

@@ -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']

+ 1
- 0
apps/admin_audit/lib/AppInfo/Application.php Vedi File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
*

Loading…
Annulla
Salva