Passed
Push — master ( f61779...efbe97 )
by John
31:43 queued 16:46
created
lib/private/Preview/JPEG.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 namespace OC\Preview;
24 24
 
25 25
 class JPEG extends Image {
26
-	/**
27
-	 * {@inheritDoc}
28
-	 */
29
-	public function getMimeType(): string {
30
-		return '/image\/jpeg/';
31
-	}
26
+    /**
27
+     * {@inheritDoc}
28
+     */
29
+    public function getMimeType(): string {
30
+        return '/image\/jpeg/';
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Events/ARemoteWipeEvent.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,16 +31,16 @@
 block discarded – undo
31 31
 
32 32
 abstract class ARemoteWipeEvent extends Event {
33 33
 
34
-	/** @var IToken */
35
-	private $token;
34
+    /** @var IToken */
35
+    private $token;
36 36
 
37
-	public function __construct(IToken $token) {
38
-		parent::__construct();
39
-		$this->token = $token;
40
-	}
37
+    public function __construct(IToken $token) {
38
+        parent::__construct();
39
+        $this->token = $token;
40
+    }
41 41
 
42
-	public function getToken(): IToken {
43
-		return $this->token;
44
-	}
42
+    public function getToken(): IToken {
43
+        return $this->token;
44
+    }
45 45
 
46 46
 }
Please login to merge, or discard this patch.
lib/public/Security/IContentSecurityPolicyManager.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -31,23 +31,23 @@
 block discarded – undo
31 31
  * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy
32 32
  */
33 33
 interface IContentSecurityPolicyManager {
34
-	/**
35
-	 * Allows to inject something into the default content policy. This is for
36
-	 * example useful when you're injecting Javascript code into a view belonging
37
-	 * to another controller and cannot modify its Content-Security-Policy itself.
38
-	 * Note that the adjustment is only applied to applications that use AppFramework
39
-	 * controllers.
40
-	 *
41
-	 * To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`,
42
-	 * $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`.
43
-	 *
44
-	 * WARNING: Using this API incorrectly may make the instance more insecure.
45
-	 * Do think twice before adding whitelisting resources. Please do also note
46
-	 * that it is not possible to use the `disallowXYZ` functions.
47
-	 *
48
-	 * @param EmptyContentSecurityPolicy $policy
49
-	 * @since 9.0.0
50
-	 * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy
51
-	 */
52
-	public function addDefaultPolicy(EmptyContentSecurityPolicy $policy);
34
+    /**
35
+     * Allows to inject something into the default content policy. This is for
36
+     * example useful when you're injecting Javascript code into a view belonging
37
+     * to another controller and cannot modify its Content-Security-Policy itself.
38
+     * Note that the adjustment is only applied to applications that use AppFramework
39
+     * controllers.
40
+     *
41
+     * To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`,
42
+     * $policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`.
43
+     *
44
+     * WARNING: Using this API incorrectly may make the instance more insecure.
45
+     * Do think twice before adding whitelisting resources. Please do also note
46
+     * that it is not possible to use the `disallowXYZ` functions.
47
+     *
48
+     * @param EmptyContentSecurityPolicy $policy
49
+     * @since 9.0.0
50
+     * @deprecated 17.0.0 listen to the AddContentSecurityPolicyEvent to add a policy
51
+     */
52
+    public function addDefaultPolicy(EmptyContentSecurityPolicy $policy);
53 53
 }
Please login to merge, or discard this patch.
lib/public/Preview/IVersionedPreviewFile.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
  * @since 17.0.0
32 32
  */
33 33
 interface IVersionedPreviewFile {
34
-	/**
35
-	 * @return string
36
-	 * @since 17.0.0
37
-	 */
38
-	public function getPreviewVersion(): string;
34
+    /**
35
+     * @return string
36
+     * @since 17.0.0
37
+     */
38
+    public function getPreviewVersion(): string;
39 39
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Token/IWipeableToken.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
 
27 27
 interface IWipeableToken extends IToken {
28 28
 
29
-	/**
30
-	 * Mark the token for remote wipe
31
-	 */
32
-	public function wipe(): void;
29
+    /**
30
+     * Mark the token for remote wipe
31
+     */
32
+    public function wipe(): void;
33 33
 
34 34
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Notifications/Notifier.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -32,65 +32,65 @@
 block discarded – undo
32 32
 
33 33
 class Notifier implements INotifier {
34 34
 
35
-	/** @var IL10nFactory */
36
-	private $factory;
35
+    /** @var IL10nFactory */
36
+    private $factory;
37 37
 
38
-	public function __construct(IL10nFactory $l10nFactory) {
39
-		$this->factory = $l10nFactory;
40
-	}
38
+    public function __construct(IL10nFactory $l10nFactory) {
39
+        $this->factory = $l10nFactory;
40
+    }
41 41
 
42
-	/**
43
-	 * @inheritDoc
44
-	 */
45
-	public function prepare(INotification $notification, string $languageCode): INotification {
46
-		if ($notification->getApp() !== 'auth') {
47
-			// Not my app => throw
48
-			throw new InvalidArgumentException();
49
-		}
42
+    /**
43
+     * @inheritDoc
44
+     */
45
+    public function prepare(INotification $notification, string $languageCode): INotification {
46
+        if ($notification->getApp() !== 'auth') {
47
+            // Not my app => throw
48
+            throw new InvalidArgumentException();
49
+        }
50 50
 
51
-		// Read the language from the notification
52
-		$l = $this->factory->get('lib', $languageCode);
51
+        // Read the language from the notification
52
+        $l = $this->factory->get('lib', $languageCode);
53 53
 
54
-		switch ($notification->getSubject()) {
55
-			case 'remote_wipe_start':
56
-				$notification->setParsedSubject(
57
-					$l->t('Remote wipe started')
58
-				)->setParsedMessage(
59
-					$l->t('A remote wipe was started on device %s', $notification->getSubjectParameters())
60
-				);
54
+        switch ($notification->getSubject()) {
55
+            case 'remote_wipe_start':
56
+                $notification->setParsedSubject(
57
+                    $l->t('Remote wipe started')
58
+                )->setParsedMessage(
59
+                    $l->t('A remote wipe was started on device %s', $notification->getSubjectParameters())
60
+                );
61 61
 
62
-				return $notification;
63
-			case 'remote_wipe_finish':
64
-				$notification->setParsedSubject(
65
-					$l->t('Remote wipe finished')
66
-				)->setParsedMessage(
67
-					$l->t('The remote wipe on %s has finished', $notification->getSubjectParameters())
68
-				);
62
+                return $notification;
63
+            case 'remote_wipe_finish':
64
+                $notification->setParsedSubject(
65
+                    $l->t('Remote wipe finished')
66
+                )->setParsedMessage(
67
+                    $l->t('The remote wipe on %s has finished', $notification->getSubjectParameters())
68
+                );
69 69
 
70
-				return $notification;
71
-			default:
72
-				// Unknown subject => Unknown notification => throw
73
-				throw new InvalidArgumentException();
74
-		}
75
-	}
70
+                return $notification;
71
+            default:
72
+                // Unknown subject => Unknown notification => throw
73
+                throw new InvalidArgumentException();
74
+        }
75
+    }
76 76
 
77
-	/**
78
-	 * Identifier of the notifier, only use [a-z0-9_]
79
-	 *
80
-	 * @return string
81
-	 * @since 17.0.0
82
-	 */
83
-	public function getID(): string {
84
-		return 'auth';
85
-	}
77
+    /**
78
+     * Identifier of the notifier, only use [a-z0-9_]
79
+     *
80
+     * @return string
81
+     * @since 17.0.0
82
+     */
83
+    public function getID(): string {
84
+        return 'auth';
85
+    }
86 86
 
87
-	/**
88
-	 * Human readable name describing the notifier
89
-	 *
90
-	 * @return string
91
-	 * @since 17.0.0
92
-	 */
93
-	public function getName(): string {
94
-		return $this->factory->get('lib')->t('Authentication');
95
-	}
87
+    /**
88
+     * Human readable name describing the notifier
89
+     *
90
+     * @return string
91
+     * @since 17.0.0
92
+     */
93
+    public function getName(): string {
94
+        return $this->factory->get('lib')->t('Authentication');
95
+    }
96 96
 }
Please login to merge, or discard this patch.
lib/private/Notification/Action.php 1 patch
Indentation   +142 added lines, -142 removed lines patch added patch discarded remove patch
@@ -28,146 +28,146 @@
 block discarded – undo
28 28
 
29 29
 class Action implements IAction {
30 30
 
31
-	/** @var string */
32
-	protected $label;
33
-
34
-	/** @var string */
35
-	protected $labelParsed;
36
-
37
-	/** @var string */
38
-	protected $link;
39
-
40
-	/** @var string */
41
-	protected $requestType;
42
-
43
-	/** @var string */
44
-	protected $icon;
45
-
46
-	/** @var bool */
47
-	protected $primary;
48
-
49
-	public function __construct() {
50
-		$this->label = '';
51
-		$this->labelParsed = '';
52
-		$this->link = '';
53
-		$this->requestType = '';
54
-		$this->primary = false;
55
-	}
56
-
57
-	/**
58
-	 * @param string $label
59
-	 * @return $this
60
-	 * @throws \InvalidArgumentException if the label is invalid
61
-	 * @since 8.2.0
62
-	 */
63
-	public function setLabel(string $label): IAction {
64
-		if ($label === '' || isset($label[32])) {
65
-			throw new \InvalidArgumentException('The given label is invalid');
66
-		}
67
-		$this->label = $label;
68
-		return $this;
69
-	}
70
-
71
-	/**
72
-	 * @return string
73
-	 * @since 8.2.0
74
-	 */
75
-	public function getLabel(): string {
76
-		return $this->label;
77
-	}
78
-
79
-	/**
80
-	 * @param string $label
81
-	 * @return $this
82
-	 * @throws \InvalidArgumentException if the label is invalid
83
-	 * @since 8.2.0
84
-	 */
85
-	public function setParsedLabel(string $label): IAction {
86
-		if ($label === '') {
87
-			throw new \InvalidArgumentException('The given parsed label is invalid');
88
-		}
89
-		$this->labelParsed = $label;
90
-		return $this;
91
-	}
92
-
93
-	/**
94
-	 * @return string
95
-	 * @since 8.2.0
96
-	 */
97
-	public function getParsedLabel(): string {
98
-		return $this->labelParsed;
99
-	}
100
-
101
-	/**
102
-	 * @param $primary bool
103
-	 * @return $this
104
-	 * @since 9.0.0
105
-	 */
106
-	public function setPrimary(bool $primary): IAction {
107
-		$this->primary = $primary;
108
-		return $this;
109
-	}
110
-
111
-	/**
112
-	 * @return bool
113
-	 * @since 9.0.0
114
-	 */
115
-	public function isPrimary(): bool {
116
-		return $this->primary;
117
-	}
118
-
119
-	/**
120
-	 * @param string $link
121
-	 * @param string $requestType
122
-	 * @return $this
123
-	 * @throws \InvalidArgumentException if the link is invalid
124
-	 * @since 8.2.0
125
-	 */
126
-	public function setLink(string $link, string $requestType): IAction {
127
-		if ($link === '' || isset($link[256])) {
128
-			throw new \InvalidArgumentException('The given link is invalid');
129
-		}
130
-		if (!in_array($requestType, [
131
-			self::TYPE_GET,
132
-			self::TYPE_POST,
133
-			self::TYPE_PUT,
134
-			self::TYPE_DELETE,
135
-			self::TYPE_WEB,
136
-		], true)) {
137
-			throw new \InvalidArgumentException('The given request type is invalid');
138
-		}
139
-		$this->link = $link;
140
-		$this->requestType = $requestType;
141
-		return $this;
142
-	}
143
-
144
-	/**
145
-	 * @return string
146
-	 * @since 8.2.0
147
-	 */
148
-	public function getLink(): string {
149
-		return $this->link;
150
-	}
151
-
152
-	/**
153
-	 * @return string
154
-	 * @since 8.2.0
155
-	 */
156
-	public function getRequestType(): string {
157
-		return $this->requestType;
158
-	}
159
-
160
-	/**
161
-	 * @return bool
162
-	 */
163
-	public function isValid(): bool {
164
-		return $this->label !== '' && $this->link !== '';
165
-	}
166
-
167
-	/**
168
-	 * @return bool
169
-	 */
170
-	public function isValidParsed(): bool {
171
-		return $this->labelParsed !== '' && $this->link !== '';
172
-	}
31
+    /** @var string */
32
+    protected $label;
33
+
34
+    /** @var string */
35
+    protected $labelParsed;
36
+
37
+    /** @var string */
38
+    protected $link;
39
+
40
+    /** @var string */
41
+    protected $requestType;
42
+
43
+    /** @var string */
44
+    protected $icon;
45
+
46
+    /** @var bool */
47
+    protected $primary;
48
+
49
+    public function __construct() {
50
+        $this->label = '';
51
+        $this->labelParsed = '';
52
+        $this->link = '';
53
+        $this->requestType = '';
54
+        $this->primary = false;
55
+    }
56
+
57
+    /**
58
+     * @param string $label
59
+     * @return $this
60
+     * @throws \InvalidArgumentException if the label is invalid
61
+     * @since 8.2.0
62
+     */
63
+    public function setLabel(string $label): IAction {
64
+        if ($label === '' || isset($label[32])) {
65
+            throw new \InvalidArgumentException('The given label is invalid');
66
+        }
67
+        $this->label = $label;
68
+        return $this;
69
+    }
70
+
71
+    /**
72
+     * @return string
73
+     * @since 8.2.0
74
+     */
75
+    public function getLabel(): string {
76
+        return $this->label;
77
+    }
78
+
79
+    /**
80
+     * @param string $label
81
+     * @return $this
82
+     * @throws \InvalidArgumentException if the label is invalid
83
+     * @since 8.2.0
84
+     */
85
+    public function setParsedLabel(string $label): IAction {
86
+        if ($label === '') {
87
+            throw new \InvalidArgumentException('The given parsed label is invalid');
88
+        }
89
+        $this->labelParsed = $label;
90
+        return $this;
91
+    }
92
+
93
+    /**
94
+     * @return string
95
+     * @since 8.2.0
96
+     */
97
+    public function getParsedLabel(): string {
98
+        return $this->labelParsed;
99
+    }
100
+
101
+    /**
102
+     * @param $primary bool
103
+     * @return $this
104
+     * @since 9.0.0
105
+     */
106
+    public function setPrimary(bool $primary): IAction {
107
+        $this->primary = $primary;
108
+        return $this;
109
+    }
110
+
111
+    /**
112
+     * @return bool
113
+     * @since 9.0.0
114
+     */
115
+    public function isPrimary(): bool {
116
+        return $this->primary;
117
+    }
118
+
119
+    /**
120
+     * @param string $link
121
+     * @param string $requestType
122
+     * @return $this
123
+     * @throws \InvalidArgumentException if the link is invalid
124
+     * @since 8.2.0
125
+     */
126
+    public function setLink(string $link, string $requestType): IAction {
127
+        if ($link === '' || isset($link[256])) {
128
+            throw new \InvalidArgumentException('The given link is invalid');
129
+        }
130
+        if (!in_array($requestType, [
131
+            self::TYPE_GET,
132
+            self::TYPE_POST,
133
+            self::TYPE_PUT,
134
+            self::TYPE_DELETE,
135
+            self::TYPE_WEB,
136
+        ], true)) {
137
+            throw new \InvalidArgumentException('The given request type is invalid');
138
+        }
139
+        $this->link = $link;
140
+        $this->requestType = $requestType;
141
+        return $this;
142
+    }
143
+
144
+    /**
145
+     * @return string
146
+     * @since 8.2.0
147
+     */
148
+    public function getLink(): string {
149
+        return $this->link;
150
+    }
151
+
152
+    /**
153
+     * @return string
154
+     * @since 8.2.0
155
+     */
156
+    public function getRequestType(): string {
157
+        return $this->requestType;
158
+    }
159
+
160
+    /**
161
+     * @return bool
162
+     */
163
+    public function isValid(): bool {
164
+        return $this->label !== '' && $this->link !== '';
165
+    }
166
+
167
+    /**
168
+     * @return bool
169
+     */
170
+    public function isValidParsed(): bool {
171
+        return $this->labelParsed !== '' && $this->link !== '';
172
+    }
173 173
 }
Please login to merge, or discard this patch.
lib/public/Notification/IApp.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -30,23 +30,23 @@
 block discarded – undo
30 30
  * @since 9.0.0
31 31
  */
32 32
 interface IApp {
33
-	/**
34
-	 * @param INotification $notification
35
-	 * @throws \InvalidArgumentException When the notification is not valid
36
-	 * @since 9.0.0
37
-	 */
38
-	public function notify(INotification $notification): void;
33
+    /**
34
+     * @param INotification $notification
35
+     * @throws \InvalidArgumentException When the notification is not valid
36
+     * @since 9.0.0
37
+     */
38
+    public function notify(INotification $notification): void;
39 39
 
40
-	/**
41
-	 * @param INotification $notification
42
-	 * @since 9.0.0
43
-	 */
44
-	public function markProcessed(INotification $notification): void;
40
+    /**
41
+     * @param INotification $notification
42
+     * @since 9.0.0
43
+     */
44
+    public function markProcessed(INotification $notification): void;
45 45
 
46
-	/**
47
-	 * @param INotification $notification
48
-	 * @return int
49
-	 * @since 9.0.0
50
-	 */
51
-	public function getCount(INotification $notification): int;
46
+    /**
47
+     * @param INotification $notification
48
+     * @return int
49
+     * @since 9.0.0
50
+     */
51
+    public function getCount(INotification $notification): int;
52 52
 }
Please login to merge, or discard this patch.
lib/public/Notification/AlreadyProcessedException.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@
 block discarded – undo
28 28
  */
29 29
 class AlreadyProcessedException extends \RuntimeException {
30 30
 
31
-	/**
32
-	 * @since 17.0.0
33
-	 */
34
-	public function __construct() {
35
-		parent::__construct('Notification is processed already');
36
-	}
31
+    /**
32
+     * @since 17.0.0
33
+     */
34
+    public function __construct() {
35
+        parent::__construct('Notification is processed already');
36
+    }
37 37
 
38 38
 }
Please login to merge, or discard this patch.