Passed
Push — master ( cd72be...c5a016 )
by Joas
17:27 queued 03:51
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.
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/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.
lib/CalDAV/Reminder/NotificationProvider/ProviderNotAvailableException.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -25,15 +25,15 @@
 block discarded – undo
25 25
 
26 26
 class ProviderNotAvailableException extends \Exception {
27 27
 
28
-	/**
29
-	 * ProviderNotAvailableException constructor.
30
-	 *
31
-	 * @since 16.0.0
32
-	 *
33
-	 * @param string $type ReminderType
34
-	 */
35
-	public function __construct(string $type) {
36
-		parent::__construct("No notification provider for type $type available");
37
-	}
28
+    /**
29
+     * ProviderNotAvailableException constructor.
30
+     *
31
+     * @since 16.0.0
32
+     *
33
+     * @param string $type ReminderType
34
+     */
35
+    public function __construct(string $type) {
36
+        parent::__construct("No notification provider for type $type available");
37
+    }
38 38
 
39 39
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/Reminder/NotificationProvider/AudioProvider.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,6 +32,6 @@
 block discarded – undo
32 32
  */
33 33
 class AudioProvider extends PushProvider {
34 34
 
35
-	/** @var string */
36
-	public const NOTIFICATION_TYPE = 'AUDIO';
35
+    /** @var string */
36
+    public const NOTIFICATION_TYPE = 'AUDIO';
37 37
 }
Please login to merge, or discard this patch.
lib/private/Preview/ProviderV1Adapter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	public function getMimeType(): string {
39
-		return (string)$this->providerV1->getMimeType();
39
+		return (string) $this->providerV1->getMimeType();
40 40
 	}
41 41
 
42 42
 	public function isAvailable(FileInfo $file): bool {
43
-		return (bool)$this->providerV1->isAvailable($file);
43
+		return (bool) $this->providerV1->isAvailable($file);
44 44
 	}
45 45
 
46 46
 	public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage {
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -34,30 +34,30 @@
 block discarded – undo
34 34
 use OCP\Preview\IProviderV2;
35 35
 
36 36
 class ProviderV1Adapter implements IProviderV2 {
37
-	private $providerV1;
37
+    private $providerV1;
38 38
 
39
-	public function __construct(IProvider $providerV1) {
40
-		$this->providerV1 = $providerV1;
41
-	}
39
+    public function __construct(IProvider $providerV1) {
40
+        $this->providerV1 = $providerV1;
41
+    }
42 42
 
43
-	public function getMimeType(): string {
44
-		return (string)$this->providerV1->getMimeType();
45
-	}
43
+    public function getMimeType(): string {
44
+        return (string)$this->providerV1->getMimeType();
45
+    }
46 46
 
47
-	public function isAvailable(FileInfo $file): bool {
48
-		return (bool)$this->providerV1->isAvailable($file);
49
-	}
47
+    public function isAvailable(FileInfo $file): bool {
48
+        return (bool)$this->providerV1->isAvailable($file);
49
+    }
50 50
 
51
-	public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage {
52
-		[$view, $path] = $this->getViewAndPath($file);
53
-		$thumbnail = $this->providerV1->getThumbnail($path, $maxX, $maxY, false, $view);
54
-		return $thumbnail === false ? null: $thumbnail;
55
-	}
51
+    public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage {
52
+        [$view, $path] = $this->getViewAndPath($file);
53
+        $thumbnail = $this->providerV1->getThumbnail($path, $maxX, $maxY, false, $view);
54
+        return $thumbnail === false ? null: $thumbnail;
55
+    }
56 56
 
57
-	private function getViewAndPath(File $file) {
58
-		$view = new View(dirname($file->getPath()));
59
-		$path = $file->getName();
57
+    private function getViewAndPath(File $file) {
58
+        $view = new View(dirname($file->getPath()));
59
+        $path = $file->getName();
60 60
 
61
-		return [$view, $path];
62
-	}
61
+        return [$view, $path];
62
+    }
63 63
 }
Please login to merge, or discard this patch.
lib/private/Repair/NC16/ClearCollectionsAccessCache.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -30,29 +30,29 @@
 block discarded – undo
30 30
 
31 31
 class ClearCollectionsAccessCache implements IRepairStep {
32 32
 
33
-	/** @var IConfig */
34
-	private $config;
35
-
36
-	/** @var IManager|Manager */
37
-	private $manager;
38
-
39
-	public function __construct(IConfig $config, IManager $manager) {
40
-		$this->config = $config;
41
-		$this->manager = $manager;
42
-	}
43
-
44
-	public function getName(): string {
45
-		return 'Clear access cache of projects';
46
-	}
47
-
48
-	private function shouldRun(): bool {
49
-		$versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0');
50
-		return version_compare($versionFromBeforeUpdate, '17.0.0.3', '<=');
51
-	}
52
-
53
-	public function run(IOutput $output): void {
54
-		if ($this->shouldRun()) {
55
-			$this->manager->invalidateAccessCacheForAllCollections();
56
-		}
57
-	}
33
+    /** @var IConfig */
34
+    private $config;
35
+
36
+    /** @var IManager|Manager */
37
+    private $manager;
38
+
39
+    public function __construct(IConfig $config, IManager $manager) {
40
+        $this->config = $config;
41
+        $this->manager = $manager;
42
+    }
43
+
44
+    public function getName(): string {
45
+        return 'Clear access cache of projects';
46
+    }
47
+
48
+    private function shouldRun(): bool {
49
+        $versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0.0');
50
+        return version_compare($versionFromBeforeUpdate, '17.0.0.3', '<=');
51
+    }
52
+
53
+    public function run(IOutput $output): void {
54
+        if ($this->shouldRun()) {
55
+            $this->manager->invalidateAccessCacheForAllCollections();
56
+        }
57
+    }
58 58
 }
Please login to merge, or discard this patch.