Passed
Push — master ( 5ad730...5c1154 )
by John
13:07 queued 13s
created
lib/public/AppFramework/Http/FeaturePolicy.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -37,23 +37,23 @@
 block discarded – undo
37 37
  * @since 17.0.0
38 38
  */
39 39
 class FeaturePolicy extends EmptyFeaturePolicy {
40
-	protected $autoplayDomains = [
41
-		'\'self\'',
42
-	];
40
+    protected $autoplayDomains = [
41
+        '\'self\'',
42
+    ];
43 43
 
44
-	/** @var string[] of allowed domains that can access the camera */
45
-	protected $cameraDomains = [];
44
+    /** @var string[] of allowed domains that can access the camera */
45
+    protected $cameraDomains = [];
46 46
 
47
-	protected $fullscreenDomains = [
48
-		'\'self\'',
49
-	];
47
+    protected $fullscreenDomains = [
48
+        '\'self\'',
49
+    ];
50 50
 
51
-	/** @var string[] of allowed domains that can use the geolocation of the device */
52
-	protected $geolocationDomains = [];
51
+    /** @var string[] of allowed domains that can use the geolocation of the device */
52
+    protected $geolocationDomains = [];
53 53
 
54
-	/** @var string[] of allowed domains that can use the microphone */
55
-	protected $microphoneDomains = [];
54
+    /** @var string[] of allowed domains that can use the microphone */
55
+    protected $microphoneDomains = [];
56 56
 
57
-	/** @var string[] of allowed domains that can use the payment API */
58
-	protected $paymentDomains = [];
57
+    /** @var string[] of allowed domains that can use the payment API */
58
+    protected $paymentDomains = [];
59 59
 }
Please login to merge, or discard this patch.
lib/private/Log/Syslog.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -30,31 +30,31 @@
 block discarded – undo
30 30
 use OCP\Log\IWriter;
31 31
 
32 32
 class Syslog extends LogDetails implements IWriter {
33
-	protected $levels = [
34
-		ILogger::DEBUG => LOG_DEBUG,
35
-		ILogger::INFO => LOG_INFO,
36
-		ILogger::WARN => LOG_WARNING,
37
-		ILogger::ERROR => LOG_ERR,
38
-		ILogger::FATAL => LOG_CRIT,
39
-	];
33
+    protected $levels = [
34
+        ILogger::DEBUG => LOG_DEBUG,
35
+        ILogger::INFO => LOG_INFO,
36
+        ILogger::WARN => LOG_WARNING,
37
+        ILogger::ERROR => LOG_ERR,
38
+        ILogger::FATAL => LOG_CRIT,
39
+    ];
40 40
 
41
-	public function __construct(SystemConfig $config) {
42
-		parent::__construct($config);
43
-		openlog($config->getValue('syslog_tag', 'Nextcloud'), LOG_PID | LOG_CONS, LOG_USER);
44
-	}
41
+    public function __construct(SystemConfig $config) {
42
+        parent::__construct($config);
43
+        openlog($config->getValue('syslog_tag', 'Nextcloud'), LOG_PID | LOG_CONS, LOG_USER);
44
+    }
45 45
 
46
-	public function __destruct() {
47
-		closelog();
48
-	}
46
+    public function __destruct() {
47
+        closelog();
48
+    }
49 49
 
50
-	/**
51
-	 * write a message in the log
52
-	 * @param string $app
53
-	 * @param string $message
54
-	 * @param int $level
55
-	 */
56
-	public function write(string $app, $message, int $level) {
57
-		$syslog_level = $this->levels[$level];
58
-		syslog($syslog_level, $this->logDetailsAsJSON($app, $message, $level));
59
-	}
50
+    /**
51
+     * write a message in the log
52
+     * @param string $app
53
+     * @param string $message
54
+     * @param int $level
55
+     */
56
+    public function write(string $app, $message, int $level) {
57
+        $syslog_level = $this->levels[$level];
58
+        syslog($syslog_level, $this->logDetailsAsJSON($app, $message, $level));
59
+    }
60 60
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Proxy/Proxy.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,16 +36,16 @@
 block discarded – undo
36 36
  */
37 37
 class Proxy extends Entity {
38 38
 
39
-	/** @var string */
40
-	protected $ownerId;
41
-	/** @var string */
42
-	protected $proxyId;
43
-	/** @var int */
44
-	protected $permissions;
39
+    /** @var string */
40
+    protected $ownerId;
41
+    /** @var string */
42
+    protected $proxyId;
43
+    /** @var int */
44
+    protected $permissions;
45 45
 
46
-	public function __construct() {
47
-		$this->addType('ownerId', 'string');
48
-		$this->addType('proxyId', 'string');
49
-		$this->addType('permissions', 'int');
50
-	}
46
+    public function __construct() {
47
+        $this->addType('ownerId', 'string');
48
+        $this->addType('proxyId', 'string');
49
+        $this->addType('permissions', 'int');
50
+    }
51 51
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -35,21 +35,21 @@
 block discarded – undo
35 35
  */
36 36
 class ResourcePrincipalBackend extends AbstractPrincipalBackend {
37 37
 
38
-	/**
39
-	 * ResourcePrincipalBackend constructor.
40
-	 *
41
-	 * @param IDBConnection $dbConnection
42
-	 * @param IUserSession $userSession
43
-	 * @param IGroupManager $groupManager
44
-	 * @param ILogger $logger
45
-	 * @param ProxyMapper $proxyMapper
46
-	 */
47
-	public function __construct(IDBConnection $dbConnection,
48
-								IUserSession $userSession,
49
-								IGroupManager $groupManager,
50
-								ILogger $logger,
51
-								ProxyMapper $proxyMapper) {
52
-		parent::__construct($dbConnection, $userSession, $groupManager, $logger,
53
-			$proxyMapper, 'principals/calendar-resources', 'resource', 'RESOURCE');
54
-	}
38
+    /**
39
+     * ResourcePrincipalBackend constructor.
40
+     *
41
+     * @param IDBConnection $dbConnection
42
+     * @param IUserSession $userSession
43
+     * @param IGroupManager $groupManager
44
+     * @param ILogger $logger
45
+     * @param ProxyMapper $proxyMapper
46
+     */
47
+    public function __construct(IDBConnection $dbConnection,
48
+                                IUserSession $userSession,
49
+                                IGroupManager $groupManager,
50
+                                ILogger $logger,
51
+                                ProxyMapper $proxyMapper) {
52
+        parent::__construct($dbConnection, $userSession, $groupManager, $logger,
53
+            $proxyMapper, 'principals/calendar-resources', 'resource', 'RESOURCE');
54
+    }
55 55
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -35,21 +35,21 @@
 block discarded – undo
35 35
  */
36 36
 class RoomPrincipalBackend extends AbstractPrincipalBackend {
37 37
 
38
-	/**
39
-	 * RoomPrincipalBackend constructor.
40
-	 *
41
-	 * @param IDBConnection $dbConnection
42
-	 * @param IUserSession $userSession
43
-	 * @param IGroupManager $groupManager
44
-	 * @param ILogger $logger
45
-	 * @param ProxyMapper $proxyMapper
46
-	 */
47
-	public function __construct(IDBConnection $dbConnection,
48
-								IUserSession $userSession,
49
-								IGroupManager $groupManager,
50
-								ILogger $logger,
51
-								ProxyMapper $proxyMapper) {
52
-		parent::__construct($dbConnection, $userSession, $groupManager, $logger,
53
-			$proxyMapper, 'principals/calendar-rooms', 'room', 'ROOM');
54
-	}
38
+    /**
39
+     * RoomPrincipalBackend constructor.
40
+     *
41
+     * @param IDBConnection $dbConnection
42
+     * @param IUserSession $userSession
43
+     * @param IGroupManager $groupManager
44
+     * @param ILogger $logger
45
+     * @param ProxyMapper $proxyMapper
46
+     */
47
+    public function __construct(IDBConnection $dbConnection,
48
+                                IUserSession $userSession,
49
+                                IGroupManager $groupManager,
50
+                                ILogger $logger,
51
+                                ProxyMapper $proxyMapper) {
52
+        parent::__construct($dbConnection, $userSession, $groupManager, $logger,
53
+            $proxyMapper, 'principals/calendar-rooms', 'room', 'ROOM');
54
+    }
55 55
 }
Please login to merge, or discard this patch.
apps/dav/lib/BackgroundJob/EventReminderJob.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -25,40 +25,40 @@
 block discarded – undo
25 25
 
26 26
 class EventReminderJob extends TimedJob {
27 27
 
28
-	/** @var ReminderService */
29
-	private $reminderService;
28
+    /** @var ReminderService */
29
+    private $reminderService;
30 30
 
31
-	/** @var IConfig */
32
-	private $config;
31
+    /** @var IConfig */
32
+    private $config;
33 33
 
34
-	/**
35
-	 * EventReminderJob constructor.
36
-	 *
37
-	 * @param ReminderService $reminderService
38
-	 * @param IConfig $config
39
-	 */
40
-	public function __construct(ReminderService $reminderService, IConfig $config) {
41
-		$this->reminderService = $reminderService;
42
-		$this->config = $config;
43
-		/** Run every 5 minutes */
44
-		$this->setInterval(5);
45
-	}
34
+    /**
35
+     * EventReminderJob constructor.
36
+     *
37
+     * @param ReminderService $reminderService
38
+     * @param IConfig $config
39
+     */
40
+    public function __construct(ReminderService $reminderService, IConfig $config) {
41
+        $this->reminderService = $reminderService;
42
+        $this->config = $config;
43
+        /** Run every 5 minutes */
44
+        $this->setInterval(5);
45
+    }
46 46
 
47
-	/**
48
-	 * @param $arg
49
-	 * @throws \OCA\DAV\CalDAV\Reminder\NotificationProvider\ProviderNotAvailableException
50
-	 * @throws \OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException
51
-	 * @throws \OC\User\NoUserException
52
-	 */
53
-	public function run($arg):void {
54
-		if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') !== 'yes') {
55
-			return;
56
-		}
47
+    /**
48
+     * @param $arg
49
+     * @throws \OCA\DAV\CalDAV\Reminder\NotificationProvider\ProviderNotAvailableException
50
+     * @throws \OCA\DAV\CalDAV\Reminder\NotificationTypeDoesNotExistException
51
+     * @throws \OC\User\NoUserException
52
+     */
53
+    public function run($arg):void {
54
+        if ($this->config->getAppValue('dav', 'sendEventReminders', 'yes') !== 'yes') {
55
+            return;
56
+        }
57 57
 
58
-		if ($this->config->getAppValue('dav', 'sendEventRemindersMode', 'backgroundjob') !== 'backgroundjob') {
59
-			return;
60
-		}
58
+        if ($this->config->getAppValue('dav', 'sendEventRemindersMode', 'backgroundjob') !== 'backgroundjob') {
59
+            return;
60
+        }
61 61
 
62
-		$this->reminderService->processReminders();
63
-	}
62
+        $this->reminderService->processReminders();
63
+    }
64 64
 }
Please login to merge, or discard this patch.
apps/dav/lib/Migration/Version1012Date20190808122342.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	 */
43 43
 	public function changeSchema(IOutput $output,
44 44
 								 \Closure $schemaClosure,
45
-								 array $options):?ISchemaWrapper {
45
+								 array $options): ?ISchemaWrapper {
46 46
 		/** @var ISchemaWrapper $schema */
47 47
 		$schema = $schemaClosure();
48 48
 
Please login to merge, or discard this patch.
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -38,86 +38,86 @@
 block discarded – undo
38 38
  */
39 39
 class Version1012Date20190808122342 extends SimpleMigrationStep {
40 40
 
41
-	/**
42
-	 * @param IOutput $output
43
-	 * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
44
-	 * @param array $options
45
-	 * @return null|ISchemaWrapper
46
-	 * @since 17.0.0
47
-	 */
48
-	public function changeSchema(IOutput $output,
49
-								 \Closure $schemaClosure,
50
-								 array $options):?ISchemaWrapper {
51
-		/** @var ISchemaWrapper $schema */
52
-		$schema = $schemaClosure();
41
+    /**
42
+     * @param IOutput $output
43
+     * @param \Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
44
+     * @param array $options
45
+     * @return null|ISchemaWrapper
46
+     * @since 17.0.0
47
+     */
48
+    public function changeSchema(IOutput $output,
49
+                                    \Closure $schemaClosure,
50
+                                    array $options):?ISchemaWrapper {
51
+        /** @var ISchemaWrapper $schema */
52
+        $schema = $schemaClosure();
53 53
 
54
-		if (!$schema->hasTable('calendar_reminders')) {
55
-			$table = $schema->createTable('calendar_reminders');
54
+        if (!$schema->hasTable('calendar_reminders')) {
55
+            $table = $schema->createTable('calendar_reminders');
56 56
 
57
-			$table->addColumn('id', Types::BIGINT, [
58
-				'autoincrement' => true,
59
-				'notnull' => true,
60
-				'length' => 11,
61
-				'unsigned' => true,
62
-			]);
63
-			$table->addColumn('calendar_id', Types::BIGINT, [
64
-				'notnull' => true,
65
-				'length' => 11,
66
-			]);
67
-			$table->addColumn('object_id', Types::BIGINT, [
68
-				'notnull' => true,
69
-				'length' => 11,
70
-			]);
71
-			$table->addColumn('is_recurring', Types::SMALLINT, [
72
-				'notnull' => false,
73
-				'length' => 1,
74
-			]);
75
-			$table->addColumn('uid', Types::STRING, [
76
-				'notnull' => true,
77
-				'length' => 255,
78
-			]);
79
-			$table->addColumn('recurrence_id', Types::BIGINT, [
80
-				'notnull' => false,
81
-				'length' => 11,
82
-				'unsigned' => true,
83
-			]);
84
-			$table->addColumn('is_recurrence_exception', Types::SMALLINT, [
85
-				'notnull' => true,
86
-				'length' => 1,
87
-			]);
88
-			$table->addColumn('event_hash', Types::STRING, [
89
-				'notnull' => true,
90
-				'length' => 255,
91
-			]);
92
-			$table->addColumn('alarm_hash', Types::STRING, [
93
-				'notnull' => true,
94
-				'length' => 255,
95
-			]);
96
-			$table->addColumn('type', Types::STRING, [
97
-				'notnull' => true,
98
-				'length' => 255,
99
-			]);
100
-			$table->addColumn('is_relative', Types::SMALLINT, [
101
-				'notnull' => true,
102
-				'length' => 1,
103
-			]);
104
-			$table->addColumn('notification_date', Types::BIGINT, [
105
-				'notnull' => true,
106
-				'length' => 11,
107
-				'unsigned' => true,
108
-			]);
109
-			$table->addColumn('is_repeat_based', Types::SMALLINT, [
110
-				'notnull' => true,
111
-				'length' => 1,
112
-			]);
57
+            $table->addColumn('id', Types::BIGINT, [
58
+                'autoincrement' => true,
59
+                'notnull' => true,
60
+                'length' => 11,
61
+                'unsigned' => true,
62
+            ]);
63
+            $table->addColumn('calendar_id', Types::BIGINT, [
64
+                'notnull' => true,
65
+                'length' => 11,
66
+            ]);
67
+            $table->addColumn('object_id', Types::BIGINT, [
68
+                'notnull' => true,
69
+                'length' => 11,
70
+            ]);
71
+            $table->addColumn('is_recurring', Types::SMALLINT, [
72
+                'notnull' => false,
73
+                'length' => 1,
74
+            ]);
75
+            $table->addColumn('uid', Types::STRING, [
76
+                'notnull' => true,
77
+                'length' => 255,
78
+            ]);
79
+            $table->addColumn('recurrence_id', Types::BIGINT, [
80
+                'notnull' => false,
81
+                'length' => 11,
82
+                'unsigned' => true,
83
+            ]);
84
+            $table->addColumn('is_recurrence_exception', Types::SMALLINT, [
85
+                'notnull' => true,
86
+                'length' => 1,
87
+            ]);
88
+            $table->addColumn('event_hash', Types::STRING, [
89
+                'notnull' => true,
90
+                'length' => 255,
91
+            ]);
92
+            $table->addColumn('alarm_hash', Types::STRING, [
93
+                'notnull' => true,
94
+                'length' => 255,
95
+            ]);
96
+            $table->addColumn('type', Types::STRING, [
97
+                'notnull' => true,
98
+                'length' => 255,
99
+            ]);
100
+            $table->addColumn('is_relative', Types::SMALLINT, [
101
+                'notnull' => true,
102
+                'length' => 1,
103
+            ]);
104
+            $table->addColumn('notification_date', Types::BIGINT, [
105
+                'notnull' => true,
106
+                'length' => 11,
107
+                'unsigned' => true,
108
+            ]);
109
+            $table->addColumn('is_repeat_based', Types::SMALLINT, [
110
+                'notnull' => true,
111
+                'length' => 1,
112
+            ]);
113 113
 
114
-			$table->setPrimaryKey(['id']);
115
-			$table->addIndex(['object_id'], 'calendar_reminder_objid');
116
-			$table->addIndex(['uid', 'recurrence_id'], 'calendar_reminder_uidrec');
114
+            $table->setPrimaryKey(['id']);
115
+            $table->addIndex(['object_id'], 'calendar_reminder_objid');
116
+            $table->addIndex(['uid', 'recurrence_id'], 'calendar_reminder_uidrec');
117 117
 
118
-			return $schema;
119
-		}
118
+            return $schema;
119
+        }
120 120
 
121
-		return null;
122
-	}
121
+        return null;
122
+    }
123 123
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -31,51 +31,51 @@
 block discarded – undo
31 31
  */
32 32
 class NotificationProviderManager {
33 33
 
34
-	/** @var INotificationProvider[] */
35
-	private $providers = [];
34
+    /** @var INotificationProvider[] */
35
+    private $providers = [];
36 36
 
37
-	/**
38
-	 * Checks whether a provider for a given ACTION exists
39
-	 *
40
-	 * @param string $type
41
-	 * @return bool
42
-	 */
43
-	public function hasProvider(string $type):bool {
44
-		return (\in_array($type, ReminderService::REMINDER_TYPES, true)
45
-			&& isset($this->providers[$type]));
46
-	}
37
+    /**
38
+     * Checks whether a provider for a given ACTION exists
39
+     *
40
+     * @param string $type
41
+     * @return bool
42
+     */
43
+    public function hasProvider(string $type):bool {
44
+        return (\in_array($type, ReminderService::REMINDER_TYPES, true)
45
+            && isset($this->providers[$type]));
46
+    }
47 47
 
48
-	/**
49
-	 * Get provider for a given ACTION
50
-	 *
51
-	 * @param string $type
52
-	 * @return INotificationProvider
53
-	 * @throws NotificationProvider\ProviderNotAvailableException
54
-	 * @throws NotificationTypeDoesNotExistException
55
-	 */
56
-	public function getProvider(string $type):INotificationProvider {
57
-		if (in_array($type, ReminderService::REMINDER_TYPES, true)) {
58
-			if (isset($this->providers[$type])) {
59
-				return $this->providers[$type];
60
-			}
61
-			throw new NotificationProvider\ProviderNotAvailableException($type);
62
-		}
63
-		throw new NotificationTypeDoesNotExistException($type);
64
-	}
48
+    /**
49
+     * Get provider for a given ACTION
50
+     *
51
+     * @param string $type
52
+     * @return INotificationProvider
53
+     * @throws NotificationProvider\ProviderNotAvailableException
54
+     * @throws NotificationTypeDoesNotExistException
55
+     */
56
+    public function getProvider(string $type):INotificationProvider {
57
+        if (in_array($type, ReminderService::REMINDER_TYPES, true)) {
58
+            if (isset($this->providers[$type])) {
59
+                return $this->providers[$type];
60
+            }
61
+            throw new NotificationProvider\ProviderNotAvailableException($type);
62
+        }
63
+        throw new NotificationTypeDoesNotExistException($type);
64
+    }
65 65
 
66
-	/**
67
-	 * Registers a new provider
68
-	 *
69
-	 * @param string $providerClassName
70
-	 * @throws \OCP\AppFramework\QueryException
71
-	 */
72
-	public function registerProvider(string $providerClassName):void {
73
-		$provider = \OC::$server->query($providerClassName);
66
+    /**
67
+     * Registers a new provider
68
+     *
69
+     * @param string $providerClassName
70
+     * @throws \OCP\AppFramework\QueryException
71
+     */
72
+    public function registerProvider(string $providerClassName):void {
73
+        $provider = \OC::$server->query($providerClassName);
74 74
 
75
-		if (!$provider instanceof INotificationProvider) {
76
-			throw new \InvalidArgumentException('Invalid notification provider registered');
77
-		}
75
+        if (!$provider instanceof INotificationProvider) {
76
+            throw new \InvalidArgumentException('Invalid notification provider registered');
77
+        }
78 78
 
79
-		$this->providers[$provider::NOTIFICATION_TYPE] = $provider;
80
-	}
79
+        $this->providers[$provider::NOTIFICATION_TYPE] = $provider;
80
+    }
81 81
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Reminder/NotificationTypeDoesNotExistException.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@
 block discarded – undo
26 26
 
27 27
 class NotificationTypeDoesNotExistException extends \Exception {
28 28
 
29
-	/**
30
-	 * NotificationTypeDoesNotExistException constructor.
31
-	 *
32
-	 * @since 16.0.0
33
-	 *
34
-	 * @param string $type ReminderType
35
-	 */
36
-	public function __construct(string $type) {
37
-		parent::__construct("Type $type is not an accepted type of notification");
38
-	}
29
+    /**
30
+     * NotificationTypeDoesNotExistException constructor.
31
+     *
32
+     * @since 16.0.0
33
+     *
34
+     * @param string $type ReminderType
35
+     */
36
+    public function __construct(string $type) {
37
+        parent::__construct("Type $type is not an accepted type of notification");
38
+    }
39 39
 
40 40
 }
Please login to merge, or discard this patch.