Passed
Push — master ( dd028f...b414f5 )
by Joas
16:16 queued 12s
created
lib/private/FullTextSearch/Model/DocumentAccess.php 1 patch
Indentation   +303 added lines, -303 removed lines patch added patch discarded remove patch
@@ -58,308 +58,308 @@
 block discarded – undo
58 58
 final class DocumentAccess implements IDocumentAccess, JsonSerializable {
59 59
 
60 60
 
61
-	/** @var string */
62
-	private $ownerId;
63
-
64
-	/** @var string */
65
-	private $viewerId = '';
66
-
67
-	/** @var array */
68
-	private $users = [];
69
-
70
-	/** @var array */
71
-	private $groups = [];
72
-
73
-	/** @var array */
74
-	private $circles = [];
75
-
76
-	/** @var array */
77
-	private $links = [];
78
-
79
-
80
-	/**
81
-	 * Owner of the document can be set at the init of the object.
82
-	 *
83
-	 * @since 16.0.0
84
-	 *
85
-	 * IDocumentAccess constructor.
86
-	 *
87
-	 * @param string $ownerId
88
-	 */
89
-	public function __construct(string $ownerId = '') {
90
-		$this->setOwnerId($ownerId);
91
-	}
92
-
93
-
94
-	/**
95
-	 * Set the Owner of the document.
96
-	 *
97
-	 * @since 16.0.0
98
-	 *
99
-	 * @param string $ownerId
100
-	 *
101
-	 * @return IDocumentAccess
102
-	 */
103
-	public function setOwnerId(string $ownerId): IDocumentAccess {
104
-		$this->ownerId = $ownerId;
105
-
106
-		return $this;
107
-	}
108
-
109
-	/**
110
-	 * Get the Owner of the document.
111
-	 *
112
-	 * @since 16.0.0
113
-	 *
114
-	 * @return string
115
-	 */
116
-	public function getOwnerId(): string {
117
-		return $this->ownerId;
118
-	}
119
-
120
-
121
-	/**
122
-	 * Set the viewer of the document.
123
-	 *
124
-	 * @since 16.0.0
125
-	 *
126
-	 * @param string $viewerId
127
-	 *
128
-	 * @return IDocumentAccess
129
-	 */
130
-	public function setViewerId(string $viewerId): IDocumentAccess {
131
-		$this->viewerId = $viewerId;
132
-
133
-		return $this;
134
-	}
135
-
136
-	/**
137
-	 * Get the viewer of the document.
138
-	 *
139
-	 * @since 16.0.0
140
-	 *
141
-	 * @return string
142
-	 */
143
-	public function getViewerId(): string {
144
-		return $this->viewerId;
145
-	}
146
-
147
-
148
-	/**
149
-	 * Set the list of users that have read access to the document.
150
-	 *
151
-	 * @since 16.0.0
152
-	 *
153
-	 * @param array $users
154
-	 *
155
-	 * @return IDocumentAccess
156
-	 */
157
-	public function setUsers(array $users): IDocumentAccess {
158
-		$this->users = $users;
159
-
160
-		return $this;
161
-	}
162
-
163
-	/**
164
-	 * Add an entry to the list of users that have read access to the document.
165
-	 *
166
-	 * @since 16.0.0
167
-	 *
168
-	 * @param string $user
169
-	 *
170
-	 * @return IDocumentAccess
171
-	 */
172
-	public function addUser(string $user): IDocumentAccess {
173
-		$this->users[] = $user;
174
-
175
-		return $this;
176
-	}
177
-
178
-	/**
179
-	 * Add multiple entries to the list of users that have read access to the
180
-	 * document.
181
-	 *
182
-	 * @since 16.0.0
183
-	 *
184
-	 * @param array $users
185
-	 *
186
-	 * @return IDocumentAccess
187
-	 */
188
-	public function addUsers($users): IDocumentAccess {
189
-		$this->users = array_merge($this->users, $users);
190
-
191
-		return $this;
192
-	}
193
-
194
-	/**
195
-	 * Get the complete list of users that have read access to the document.
196
-	 *
197
-	 * @since 16.0.0
198
-	 *
199
-	 * @return array
200
-	 */
201
-	public function getUsers(): array {
202
-		return $this->users;
203
-	}
204
-
205
-
206
-	/**
207
-	 * Set the list of groups that have read access to the document.
208
-	 *
209
-	 * @since 16.0.0
210
-	 *
211
-	 * @param array $groups
212
-	 *
213
-	 * @return IDocumentAccess
214
-	 */
215
-	public function setGroups(array $groups): IDocumentAccess {
216
-		$this->groups = $groups;
217
-
218
-		return $this;
219
-	}
220
-
221
-	/**
222
-	 * Add an entry to the list of groups that have read access to the document.
223
-	 *
224
-	 * @since 16.0.0
225
-	 *
226
-	 * @param string $group
227
-	 *
228
-	 * @return IDocumentAccess
229
-	 */
230
-	public function addGroup(string $group): IDocumentAccess {
231
-		$this->groups[] = $group;
232
-
233
-		return $this;
234
-	}
235
-
236
-	/**
237
-	 * Add multiple entries to the list of groups that have read access to the
238
-	 * document.
239
-	 *
240
-	 * @since 16.0.0
241
-	 *
242
-	 * @param array $groups
243
-	 *
244
-	 * @return IDocumentAccess
245
-	 */
246
-	public function addGroups(array $groups) {
247
-		$this->groups = array_merge($this->groups, $groups);
248
-
249
-		return $this;
250
-	}
251
-
252
-	/**
253
-	 * Get the complete list of groups that have read access to the document.
254
-	 *
255
-	 * @since 16.0.0
256
-	 *
257
-	 * @return array
258
-	 */
259
-	public function getGroups(): array {
260
-		return $this->groups;
261
-	}
262
-
263
-
264
-	/**
265
-	 * Set the list of circles that have read access to the document.
266
-	 *
267
-	 * @since 16.0.0
268
-	 *
269
-	 * @param array $circles
270
-	 *
271
-	 * @return IDocumentAccess
272
-	 */
273
-	public function setCircles(array $circles): IDocumentAccess {
274
-		$this->circles = $circles;
275
-
276
-		return $this;
277
-	}
278
-
279
-	/**
280
-	 * Add an entry to the list of circles that have read access to the document.
281
-	 *
282
-	 * @since 16.0.0
283
-	 *
284
-	 * @param string $circle
285
-	 *
286
-	 * @return IDocumentAccess
287
-	 */
288
-	public function addCircle(string $circle): IDocumentAccess {
289
-		$this->circles[] = $circle;
290
-
291
-		return $this;
292
-	}
293
-
294
-	/**
295
-	 * Add multiple entries to the list of groups that have read access to the
296
-	 * document.
297
-	 *
298
-	 * @since 16.0.0
299
-	 *
300
-	 * @param array $circles
301
-	 *
302
-	 * @return IDocumentAccess
303
-	 */
304
-	public function addCircles(array $circles): IDocumentAccess {
305
-		$this->circles = array_merge($this->circles, $circles);
306
-
307
-		return $this;
308
-	}
309
-
310
-	/**
311
-	 * Get the complete list of circles that have read access to the document.
312
-	 *
313
-	 * @since 16.0.0
314
-	 *
315
-	 * @return array
316
-	 */
317
-	public function getCircles(): array {
318
-		return $this->circles;
319
-	}
320
-
321
-
322
-	/**
323
-	 * Set the list of links that have read access to the document.
324
-	 *
325
-	 * @since 16.0.0
326
-	 *
327
-	 * @param array $links
328
-	 *
329
-	 * @return IDocumentAccess
330
-	 */
331
-	public function setLinks(array $links): IDocumentAccess {
332
-		$this->links = $links;
333
-
334
-		return $this;
335
-	}
336
-
337
-	/**
338
-	 * Get the list of links that have read access to the document.
339
-	 *
340
-	 * @since 16.0.0
341
-	 *
342
-	 * @return array
343
-	 */
344
-	public function getLinks(): array {
345
-		return $this->links;
346
-	}
347
-
348
-
349
-	/**
350
-	 * @since 16.0.0
351
-	 *
352
-	 * @return array
353
-	 */
354
-	public function jsonSerialize(): array {
355
-		return [
356
-			'ownerId' => $this->getOwnerId(),
357
-			'viewerId' => $this->getViewerId(),
358
-			'users' => $this->getUsers(),
359
-			'groups' => $this->getGroups(),
360
-			'circles' => $this->getCircles(),
361
-			'links' => $this->getLinks()
362
-		];
363
-	}
61
+    /** @var string */
62
+    private $ownerId;
63
+
64
+    /** @var string */
65
+    private $viewerId = '';
66
+
67
+    /** @var array */
68
+    private $users = [];
69
+
70
+    /** @var array */
71
+    private $groups = [];
72
+
73
+    /** @var array */
74
+    private $circles = [];
75
+
76
+    /** @var array */
77
+    private $links = [];
78
+
79
+
80
+    /**
81
+     * Owner of the document can be set at the init of the object.
82
+     *
83
+     * @since 16.0.0
84
+     *
85
+     * IDocumentAccess constructor.
86
+     *
87
+     * @param string $ownerId
88
+     */
89
+    public function __construct(string $ownerId = '') {
90
+        $this->setOwnerId($ownerId);
91
+    }
92
+
93
+
94
+    /**
95
+     * Set the Owner of the document.
96
+     *
97
+     * @since 16.0.0
98
+     *
99
+     * @param string $ownerId
100
+     *
101
+     * @return IDocumentAccess
102
+     */
103
+    public function setOwnerId(string $ownerId): IDocumentAccess {
104
+        $this->ownerId = $ownerId;
105
+
106
+        return $this;
107
+    }
108
+
109
+    /**
110
+     * Get the Owner of the document.
111
+     *
112
+     * @since 16.0.0
113
+     *
114
+     * @return string
115
+     */
116
+    public function getOwnerId(): string {
117
+        return $this->ownerId;
118
+    }
119
+
120
+
121
+    /**
122
+     * Set the viewer of the document.
123
+     *
124
+     * @since 16.0.0
125
+     *
126
+     * @param string $viewerId
127
+     *
128
+     * @return IDocumentAccess
129
+     */
130
+    public function setViewerId(string $viewerId): IDocumentAccess {
131
+        $this->viewerId = $viewerId;
132
+
133
+        return $this;
134
+    }
135
+
136
+    /**
137
+     * Get the viewer of the document.
138
+     *
139
+     * @since 16.0.0
140
+     *
141
+     * @return string
142
+     */
143
+    public function getViewerId(): string {
144
+        return $this->viewerId;
145
+    }
146
+
147
+
148
+    /**
149
+     * Set the list of users that have read access to the document.
150
+     *
151
+     * @since 16.0.0
152
+     *
153
+     * @param array $users
154
+     *
155
+     * @return IDocumentAccess
156
+     */
157
+    public function setUsers(array $users): IDocumentAccess {
158
+        $this->users = $users;
159
+
160
+        return $this;
161
+    }
162
+
163
+    /**
164
+     * Add an entry to the list of users that have read access to the document.
165
+     *
166
+     * @since 16.0.0
167
+     *
168
+     * @param string $user
169
+     *
170
+     * @return IDocumentAccess
171
+     */
172
+    public function addUser(string $user): IDocumentAccess {
173
+        $this->users[] = $user;
174
+
175
+        return $this;
176
+    }
177
+
178
+    /**
179
+     * Add multiple entries to the list of users that have read access to the
180
+     * document.
181
+     *
182
+     * @since 16.0.0
183
+     *
184
+     * @param array $users
185
+     *
186
+     * @return IDocumentAccess
187
+     */
188
+    public function addUsers($users): IDocumentAccess {
189
+        $this->users = array_merge($this->users, $users);
190
+
191
+        return $this;
192
+    }
193
+
194
+    /**
195
+     * Get the complete list of users that have read access to the document.
196
+     *
197
+     * @since 16.0.0
198
+     *
199
+     * @return array
200
+     */
201
+    public function getUsers(): array {
202
+        return $this->users;
203
+    }
204
+
205
+
206
+    /**
207
+     * Set the list of groups that have read access to the document.
208
+     *
209
+     * @since 16.0.0
210
+     *
211
+     * @param array $groups
212
+     *
213
+     * @return IDocumentAccess
214
+     */
215
+    public function setGroups(array $groups): IDocumentAccess {
216
+        $this->groups = $groups;
217
+
218
+        return $this;
219
+    }
220
+
221
+    /**
222
+     * Add an entry to the list of groups that have read access to the document.
223
+     *
224
+     * @since 16.0.0
225
+     *
226
+     * @param string $group
227
+     *
228
+     * @return IDocumentAccess
229
+     */
230
+    public function addGroup(string $group): IDocumentAccess {
231
+        $this->groups[] = $group;
232
+
233
+        return $this;
234
+    }
235
+
236
+    /**
237
+     * Add multiple entries to the list of groups that have read access to the
238
+     * document.
239
+     *
240
+     * @since 16.0.0
241
+     *
242
+     * @param array $groups
243
+     *
244
+     * @return IDocumentAccess
245
+     */
246
+    public function addGroups(array $groups) {
247
+        $this->groups = array_merge($this->groups, $groups);
248
+
249
+        return $this;
250
+    }
251
+
252
+    /**
253
+     * Get the complete list of groups that have read access to the document.
254
+     *
255
+     * @since 16.0.0
256
+     *
257
+     * @return array
258
+     */
259
+    public function getGroups(): array {
260
+        return $this->groups;
261
+    }
262
+
263
+
264
+    /**
265
+     * Set the list of circles that have read access to the document.
266
+     *
267
+     * @since 16.0.0
268
+     *
269
+     * @param array $circles
270
+     *
271
+     * @return IDocumentAccess
272
+     */
273
+    public function setCircles(array $circles): IDocumentAccess {
274
+        $this->circles = $circles;
275
+
276
+        return $this;
277
+    }
278
+
279
+    /**
280
+     * Add an entry to the list of circles that have read access to the document.
281
+     *
282
+     * @since 16.0.0
283
+     *
284
+     * @param string $circle
285
+     *
286
+     * @return IDocumentAccess
287
+     */
288
+    public function addCircle(string $circle): IDocumentAccess {
289
+        $this->circles[] = $circle;
290
+
291
+        return $this;
292
+    }
293
+
294
+    /**
295
+     * Add multiple entries to the list of groups that have read access to the
296
+     * document.
297
+     *
298
+     * @since 16.0.0
299
+     *
300
+     * @param array $circles
301
+     *
302
+     * @return IDocumentAccess
303
+     */
304
+    public function addCircles(array $circles): IDocumentAccess {
305
+        $this->circles = array_merge($this->circles, $circles);
306
+
307
+        return $this;
308
+    }
309
+
310
+    /**
311
+     * Get the complete list of circles that have read access to the document.
312
+     *
313
+     * @since 16.0.0
314
+     *
315
+     * @return array
316
+     */
317
+    public function getCircles(): array {
318
+        return $this->circles;
319
+    }
320
+
321
+
322
+    /**
323
+     * Set the list of links that have read access to the document.
324
+     *
325
+     * @since 16.0.0
326
+     *
327
+     * @param array $links
328
+     *
329
+     * @return IDocumentAccess
330
+     */
331
+    public function setLinks(array $links): IDocumentAccess {
332
+        $this->links = $links;
333
+
334
+        return $this;
335
+    }
336
+
337
+    /**
338
+     * Get the list of links that have read access to the document.
339
+     *
340
+     * @since 16.0.0
341
+     *
342
+     * @return array
343
+     */
344
+    public function getLinks(): array {
345
+        return $this->links;
346
+    }
347
+
348
+
349
+    /**
350
+     * @since 16.0.0
351
+     *
352
+     * @return array
353
+     */
354
+    public function jsonSerialize(): array {
355
+        return [
356
+            'ownerId' => $this->getOwnerId(),
357
+            'viewerId' => $this->getViewerId(),
358
+            'users' => $this->getUsers(),
359
+            'groups' => $this->getGroups(),
360
+            'circles' => $this->getCircles(),
361
+            'links' => $this->getLinks()
362
+        ];
363
+    }
364 364
 }
365 365
 
Please login to merge, or discard this patch.
lib/private/Collaboration/Resources/Resource.php 1 patch
Indentation   +125 added lines, -125 removed lines patch added patch discarded remove patch
@@ -31,129 +31,129 @@
 block discarded – undo
31 31
 
32 32
 class Resource implements IResource {
33 33
 
34
-	/** @var IManager */
35
-	protected $manager;
36
-
37
-	/** @var IDBConnection */
38
-	protected $connection;
39
-
40
-	/** @var string */
41
-	protected $type;
42
-
43
-	/** @var string */
44
-	protected $id;
45
-
46
-	/** @var IUser|null */
47
-	protected $userForAccess;
48
-
49
-	/** @var bool|null */
50
-	protected $access;
51
-
52
-	/** @var array|null */
53
-	protected $data;
54
-
55
-	public function __construct(
56
-		IManager $manager,
57
-		IDBConnection $connection,
58
-		string $type,
59
-		string $id,
60
-		?IUser $userForAccess = null,
61
-		?bool $access = null
62
-	) {
63
-		$this->manager = $manager;
64
-		$this->connection = $connection;
65
-		$this->type = $type;
66
-		$this->id = $id;
67
-		$this->userForAccess = $userForAccess;
68
-		$this->access = $access;
69
-	}
70
-
71
-	/**
72
-	 * @return string
73
-	 * @since 16.0.0
74
-	 */
75
-	public function getType(): string {
76
-		return $this->type;
77
-	}
78
-
79
-	/**
80
-	 * @return string
81
-	 * @since 16.0.0
82
-	 */
83
-	public function getId(): string {
84
-		return $this->id;
85
-	}
86
-
87
-	/**
88
-	 * @return array
89
-	 * @since 16.0.0
90
-	 */
91
-	public function getRichObject(): array {
92
-		if ($this->data === null) {
93
-			$this->data = $this->manager->getResourceRichObject($this);
94
-		}
95
-
96
-		return $this->data;
97
-	}
98
-
99
-	/**
100
-	 * Can a user/guest access the resource
101
-	 *
102
-	 * @param IUser|null $user
103
-	 * @return bool
104
-	 * @since 16.0.0
105
-	 */
106
-	public function canAccess(?IUser $user): bool {
107
-		if ($user instanceof IUser) {
108
-			return $this->canUserAccess($user);
109
-		}
110
-		return $this->canGuestAccess();
111
-	}
112
-
113
-	protected function canUserAccess(IUser $user): bool {
114
-		if (\is_bool($this->access) && $this->userForAccess instanceof IUser && $user->getUID() === $this->userForAccess->getUID()) {
115
-			return $this->access;
116
-		}
117
-
118
-		$access = $this->manager->canAccessResource($this, $user);
119
-		if ($this->userForAccess instanceof IUser && $user->getUID() === $this->userForAccess->getUID()) {
120
-			$this->access = $access;
121
-		}
122
-		return $access;
123
-	}
124
-
125
-	protected function canGuestAccess(): bool {
126
-		if (\is_bool($this->access) && !$this->userForAccess instanceof IUser) {
127
-			return $this->access;
128
-		}
129
-
130
-		$access = $this->manager->canAccessResource($this, null);
131
-		if (!$this->userForAccess instanceof IUser) {
132
-			$this->access = $access;
133
-		}
134
-		return $access;
135
-	}
136
-
137
-	/**
138
-	 * @return ICollection[]
139
-	 * @since 16.0.0
140
-	 */
141
-	public function getCollections(): array {
142
-		$collections = [];
143
-
144
-		$query = $this->connection->getQueryBuilder();
145
-
146
-		$query->select('collection_id')
147
-			->from('collres_resources')
148
-			->where($query->expr()->eq('resource_type', $query->createNamedParameter($this->getType())))
149
-			->andWhere($query->expr()->eq('resource_id', $query->createNamedParameter($this->getId())));
150
-
151
-		$result = $query->execute();
152
-		while ($row = $result->fetch()) {
153
-			$collections[] = $this->manager->getCollection((int) $row['collection_id']);
154
-		}
155
-		$result->closeCursor();
156
-
157
-		return $collections;
158
-	}
34
+    /** @var IManager */
35
+    protected $manager;
36
+
37
+    /** @var IDBConnection */
38
+    protected $connection;
39
+
40
+    /** @var string */
41
+    protected $type;
42
+
43
+    /** @var string */
44
+    protected $id;
45
+
46
+    /** @var IUser|null */
47
+    protected $userForAccess;
48
+
49
+    /** @var bool|null */
50
+    protected $access;
51
+
52
+    /** @var array|null */
53
+    protected $data;
54
+
55
+    public function __construct(
56
+        IManager $manager,
57
+        IDBConnection $connection,
58
+        string $type,
59
+        string $id,
60
+        ?IUser $userForAccess = null,
61
+        ?bool $access = null
62
+    ) {
63
+        $this->manager = $manager;
64
+        $this->connection = $connection;
65
+        $this->type = $type;
66
+        $this->id = $id;
67
+        $this->userForAccess = $userForAccess;
68
+        $this->access = $access;
69
+    }
70
+
71
+    /**
72
+     * @return string
73
+     * @since 16.0.0
74
+     */
75
+    public function getType(): string {
76
+        return $this->type;
77
+    }
78
+
79
+    /**
80
+     * @return string
81
+     * @since 16.0.0
82
+     */
83
+    public function getId(): string {
84
+        return $this->id;
85
+    }
86
+
87
+    /**
88
+     * @return array
89
+     * @since 16.0.0
90
+     */
91
+    public function getRichObject(): array {
92
+        if ($this->data === null) {
93
+            $this->data = $this->manager->getResourceRichObject($this);
94
+        }
95
+
96
+        return $this->data;
97
+    }
98
+
99
+    /**
100
+     * Can a user/guest access the resource
101
+     *
102
+     * @param IUser|null $user
103
+     * @return bool
104
+     * @since 16.0.0
105
+     */
106
+    public function canAccess(?IUser $user): bool {
107
+        if ($user instanceof IUser) {
108
+            return $this->canUserAccess($user);
109
+        }
110
+        return $this->canGuestAccess();
111
+    }
112
+
113
+    protected function canUserAccess(IUser $user): bool {
114
+        if (\is_bool($this->access) && $this->userForAccess instanceof IUser && $user->getUID() === $this->userForAccess->getUID()) {
115
+            return $this->access;
116
+        }
117
+
118
+        $access = $this->manager->canAccessResource($this, $user);
119
+        if ($this->userForAccess instanceof IUser && $user->getUID() === $this->userForAccess->getUID()) {
120
+            $this->access = $access;
121
+        }
122
+        return $access;
123
+    }
124
+
125
+    protected function canGuestAccess(): bool {
126
+        if (\is_bool($this->access) && !$this->userForAccess instanceof IUser) {
127
+            return $this->access;
128
+        }
129
+
130
+        $access = $this->manager->canAccessResource($this, null);
131
+        if (!$this->userForAccess instanceof IUser) {
132
+            $this->access = $access;
133
+        }
134
+        return $access;
135
+    }
136
+
137
+    /**
138
+     * @return ICollection[]
139
+     * @since 16.0.0
140
+     */
141
+    public function getCollections(): array {
142
+        $collections = [];
143
+
144
+        $query = $this->connection->getQueryBuilder();
145
+
146
+        $query->select('collection_id')
147
+            ->from('collres_resources')
148
+            ->where($query->expr()->eq('resource_type', $query->createNamedParameter($this->getType())))
149
+            ->andWhere($query->expr()->eq('resource_id', $query->createNamedParameter($this->getId())));
150
+
151
+        $result = $query->execute();
152
+        while ($row = $result->fetch()) {
153
+            $collections[] = $this->manager->getCollection((int) $row['collection_id']);
154
+        }
155
+        $result->closeCursor();
156
+
157
+        return $collections;
158
+    }
159 159
 }
Please login to merge, or discard this patch.
lib/public/Collaboration/Resources/IResource.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -29,36 +29,36 @@
 block discarded – undo
29 29
  */
30 30
 interface IResource {
31 31
 
32
-	/**
33
-	 * @return string
34
-	 * @since 16.0.0
35
-	 */
36
-	public function getType(): string;
32
+    /**
33
+     * @return string
34
+     * @since 16.0.0
35
+     */
36
+    public function getType(): string;
37 37
 
38
-	/**
39
-	 * @return string
40
-	 * @since 16.0.0
41
-	 */
42
-	public function getId(): string;
38
+    /**
39
+     * @return string
40
+     * @since 16.0.0
41
+     */
42
+    public function getId(): string;
43 43
 
44
-	/**
45
-	 * @return array
46
-	 * @since 16.0.0
47
-	 */
48
-	public function getRichObject(): array;
44
+    /**
45
+     * @return array
46
+     * @since 16.0.0
47
+     */
48
+    public function getRichObject(): array;
49 49
 
50
-	/**
51
-	 * Can a user/guest access the resource
52
-	 *
53
-	 * @param IUser|null $user
54
-	 * @return bool
55
-	 * @since 16.0.0
56
-	 */
57
-	public function canAccess(?IUser $user): bool;
50
+    /**
51
+     * Can a user/guest access the resource
52
+     *
53
+     * @param IUser|null $user
54
+     * @return bool
55
+     * @since 16.0.0
56
+     */
57
+    public function canAccess(?IUser $user): bool;
58 58
 
59
-	/**
60
-	 * @return ICollection[]
61
-	 * @since 16.0.0
62
-	 */
63
-	public function getCollections(): array;
59
+    /**
60
+     * @return ICollection[]
61
+     * @since 16.0.0
62
+     */
63
+    public function getCollections(): array;
64 64
 }
Please login to merge, or discard this patch.
lib/public/Collaboration/Resources/IProvider.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -29,31 +29,31 @@
 block discarded – undo
29 29
  */
30 30
 interface IProvider {
31 31
 
32
-	/**
33
-	 * Get the resource type of the provider
34
-	 *
35
-	 * @return string
36
-	 * @since 16.0.0
37
-	 */
38
-	public function getType(): string;
32
+    /**
33
+     * Get the resource type of the provider
34
+     *
35
+     * @return string
36
+     * @since 16.0.0
37
+     */
38
+    public function getType(): string;
39 39
 
40
-	/**
41
-	 * Get the rich object data of a resource
42
-	 *
43
-	 * @param IResource $resource
44
-	 * @return array
45
-	 * @since 16.0.0
46
-	 */
47
-	public function getResourceRichObject(IResource $resource): array;
40
+    /**
41
+     * Get the rich object data of a resource
42
+     *
43
+     * @param IResource $resource
44
+     * @return array
45
+     * @since 16.0.0
46
+     */
47
+    public function getResourceRichObject(IResource $resource): array;
48 48
 
49
-	/**
50
-	 * Can a user/guest access the collection
51
-	 *
52
-	 * @param IResource $resource
53
-	 * @param IUser|null $user
54
-	 * @return bool
55
-	 * @since 16.0.0
56
-	 */
57
-	public function canAccessResource(IResource $resource, ?IUser $user): bool;
49
+    /**
50
+     * Can a user/guest access the collection
51
+     *
52
+     * @param IResource $resource
53
+     * @param IUser|null $user
54
+     * @return bool
55
+     * @since 16.0.0
56
+     */
57
+    public function canAccessResource(IResource $resource, ?IUser $user): bool;
58 58
 
59 59
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/IFullTextSearchManager.php 1 patch
Indentation   +139 added lines, -139 removed lines patch added patch discarded remove patch
@@ -51,145 +51,145 @@
 block discarded – undo
51 51
 interface IFullTextSearchManager {
52 52
 
53 53
 
54
-	/**
55
-	 * Register a IProviderService.
56
-	 *
57
-	 * @since 15.0.0
58
-	 *
59
-	 * @param IProviderService $providerService
60
-	 */
61
-	public function registerProviderService(IProviderService $providerService);
62
-
63
-	/**
64
-	 * Register a IIndexService.
65
-	 *
66
-	 * @since 15.0.0
67
-	 *
68
-	 * @param IIndexService $indexService
69
-	 */
70
-	public function registerIndexService(IIndexService $indexService);
71
-
72
-	/**
73
-	 * Register a ISearchService.
74
-	 *
75
-	 * @since 15.0.0
76
-	 *
77
-	 * @param ISearchService $searchService
78
-	 */
79
-	public function registerSearchService(ISearchService $searchService);
80
-
81
-	/**
82
-	 * returns true is Full Text Search is available (app is present and Service
83
-	 * are registered)
84
-	 *
85
-	 * @since 16.0.0
86
-	 *
87
-	 * @return bool
88
-	 */
89
-	public function isAvailable(): bool;
90
-
91
-
92
-	/**
93
-	 * Add the Javascript API in the navigation page of an app.
94
-	 * Needed to replace the default search.
95
-	 *
96
-	 * @since 15.0.0
97
-	 */
98
-	public function addJavascriptAPI();
99
-
100
-
101
-	/**
102
-	 * Check if the provider $providerId is already indexed.
103
-	 *
104
-	 * @since 15.0.0
105
-	 *
106
-	 * @param string $providerId
107
-	 *
108
-	 * @return bool
109
-	 */
110
-	public function isProviderIndexed(string $providerId): bool;
111
-
112
-
113
-	/**
114
-	 * Retrieve an Index from the database, based on the Id of the Provider
115
-	 * and the Id of the Document
116
-	 *
117
-	 * @since 15.0.0
118
-	 *
119
-	 * @param string $providerId
120
-	 * @param string $documentId
121
-	 *
122
-	 * @return IIndex
123
-	 */
124
-	public function getIndex(string $providerId, string $documentId): IIndex;
125
-
126
-
127
-	/**
128
-	 * Create a new Index.
129
-	 *
130
-	 * This method must be called when a new document is created.
131
-	 *
132
-	 * @since 15.0.0
133
-	 *
134
-	 * @param string $providerId
135
-	 * @param string $documentId
136
-	 * @param string $userId
137
-	 * @param int $status
138
-	 *
139
-	 * @return IIndex
140
-	 */
141
-	public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex;
142
-
143
-
144
-	/**
145
-	 * Update the status of an Index. status is a bitflag, setting $reset to
146
-	 * true will reset the status to the value defined in the parameter.
147
-	 *
148
-	 * @since 15.0.0
149
-	 *
150
-	 * @param string $providerId
151
-	 * @param string $documentId
152
-	 * @param int $status
153
-	 * @param bool $reset
154
-	 */
155
-	public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
156
-
157
-
158
-	/**
159
-	 * Update the status of an array of Index. status is a bit flag, setting $reset to
160
-	 * true will reset the status to the value defined in the parameter.
161
-	 *
162
-	 * @since 15.0.0
163
-	 *
164
-	 * @param string $providerId
165
-	 * @param array $documentIds
166
-	 * @param int $status
167
-	 * @param bool $reset
168
-	 */
169
-	public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
170
-
171
-	/**
172
-	 * Update an array of Index.
173
-	 *
174
-	 * @since 15.0.0
175
-	 *
176
-	 * @param IIndex[] $indexes
177
-	 */
178
-	public function updateIndexes(array $indexes);
179
-
180
-	/**
181
-	 * Search using an array as request. If $userId is empty, will use the
182
-	 * current session.
183
-	 *
184
-	 * @see ISearchService::generateSearchRequest
185
-	 *
186
-	 * @since 15.0.0
187
-	 *
188
-	 * @param array $request
189
-	 * @param string $userId
190
-	 * @return ISearchResult[]
191
-	 */
192
-	public function search(array $request, string $userId = ''): array;
54
+    /**
55
+     * Register a IProviderService.
56
+     *
57
+     * @since 15.0.0
58
+     *
59
+     * @param IProviderService $providerService
60
+     */
61
+    public function registerProviderService(IProviderService $providerService);
62
+
63
+    /**
64
+     * Register a IIndexService.
65
+     *
66
+     * @since 15.0.0
67
+     *
68
+     * @param IIndexService $indexService
69
+     */
70
+    public function registerIndexService(IIndexService $indexService);
71
+
72
+    /**
73
+     * Register a ISearchService.
74
+     *
75
+     * @since 15.0.0
76
+     *
77
+     * @param ISearchService $searchService
78
+     */
79
+    public function registerSearchService(ISearchService $searchService);
80
+
81
+    /**
82
+     * returns true is Full Text Search is available (app is present and Service
83
+     * are registered)
84
+     *
85
+     * @since 16.0.0
86
+     *
87
+     * @return bool
88
+     */
89
+    public function isAvailable(): bool;
90
+
91
+
92
+    /**
93
+     * Add the Javascript API in the navigation page of an app.
94
+     * Needed to replace the default search.
95
+     *
96
+     * @since 15.0.0
97
+     */
98
+    public function addJavascriptAPI();
99
+
100
+
101
+    /**
102
+     * Check if the provider $providerId is already indexed.
103
+     *
104
+     * @since 15.0.0
105
+     *
106
+     * @param string $providerId
107
+     *
108
+     * @return bool
109
+     */
110
+    public function isProviderIndexed(string $providerId): bool;
111
+
112
+
113
+    /**
114
+     * Retrieve an Index from the database, based on the Id of the Provider
115
+     * and the Id of the Document
116
+     *
117
+     * @since 15.0.0
118
+     *
119
+     * @param string $providerId
120
+     * @param string $documentId
121
+     *
122
+     * @return IIndex
123
+     */
124
+    public function getIndex(string $providerId, string $documentId): IIndex;
125
+
126
+
127
+    /**
128
+     * Create a new Index.
129
+     *
130
+     * This method must be called when a new document is created.
131
+     *
132
+     * @since 15.0.0
133
+     *
134
+     * @param string $providerId
135
+     * @param string $documentId
136
+     * @param string $userId
137
+     * @param int $status
138
+     *
139
+     * @return IIndex
140
+     */
141
+    public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex;
142
+
143
+
144
+    /**
145
+     * Update the status of an Index. status is a bitflag, setting $reset to
146
+     * true will reset the status to the value defined in the parameter.
147
+     *
148
+     * @since 15.0.0
149
+     *
150
+     * @param string $providerId
151
+     * @param string $documentId
152
+     * @param int $status
153
+     * @param bool $reset
154
+     */
155
+    public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
156
+
157
+
158
+    /**
159
+     * Update the status of an array of Index. status is a bit flag, setting $reset to
160
+     * true will reset the status to the value defined in the parameter.
161
+     *
162
+     * @since 15.0.0
163
+     *
164
+     * @param string $providerId
165
+     * @param array $documentIds
166
+     * @param int $status
167
+     * @param bool $reset
168
+     */
169
+    public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
170
+
171
+    /**
172
+     * Update an array of Index.
173
+     *
174
+     * @since 15.0.0
175
+     *
176
+     * @param IIndex[] $indexes
177
+     */
178
+    public function updateIndexes(array $indexes);
179
+
180
+    /**
181
+     * Search using an array as request. If $userId is empty, will use the
182
+     * current session.
183
+     *
184
+     * @see ISearchService::generateSearchRequest
185
+     *
186
+     * @since 15.0.0
187
+     *
188
+     * @param array $request
189
+     * @param string $userId
190
+     * @return ISearchResult[]
191
+     */
192
+    public function search(array $request, string $userId = ''): array;
193 193
 
194 194
 
195 195
 }
Please login to merge, or discard this patch.
lib/private/FullTextSearch/FullTextSearchManager.php 1 patch
Indentation   +188 added lines, -188 removed lines patch added patch discarded remove patch
@@ -48,194 +48,194 @@
 block discarded – undo
48 48
 class FullTextSearchManager implements IFullTextSearchManager {
49 49
 
50 50
 
51
-	/** @var IProviderService */
52
-	private $providerService;
53
-
54
-	/** @var IIndexService */
55
-	private $indexService;
56
-
57
-	/** @var ISearchService */
58
-	private $searchService;
59
-
60
-
61
-	/**
62
-	 * @since 15.0.0
63
-	 *
64
-	 * @param IProviderService $providerService
65
-	 */
66
-	public function registerProviderService(IProviderService $providerService) {
67
-		$this->providerService = $providerService;
68
-	}
69
-
70
-	/**
71
-	 * @since 15.0.0
72
-	 *
73
-	 * @param IIndexService $indexService
74
-	 */
75
-	public function registerIndexService(IIndexService $indexService) {
76
-		$this->indexService = $indexService;
77
-	}
78
-
79
-	/**
80
-	 * @since 15.0.0
81
-	 *
82
-	 * @param ISearchService $searchService
83
-	 */
84
-	public function registerSearchService(ISearchService $searchService) {
85
-		$this->searchService = $searchService;
86
-	}
87
-
88
-	/**
89
-	 * @since 16.0.0
90
-	 *
91
-	 * @return bool
92
-	 */
93
-	public function isAvailable(): bool {
94
-		if ($this->indexService === null ||
95
-			$this->providerService === null ||
96
-			$this->searchService === null) {
97
-			return false;
98
-		}
99
-
100
-		return true;
101
-	}
102
-
103
-
104
-	/**
105
-	 * @return IProviderService
106
-	 * @throws FullTextSearchAppNotAvailableException
107
-	 */
108
-	private function getProviderService(): IProviderService {
109
-		if ($this->providerService === null) {
110
-			throw new FullTextSearchAppNotAvailableException('No IProviderService registered');
111
-		}
112
-
113
-		return $this->providerService;
114
-	}
115
-
116
-
117
-	/**
118
-	 * @return IIndexService
119
-	 * @throws FullTextSearchAppNotAvailableException
120
-	 */
121
-	private function getIndexService(): IIndexService {
122
-		if ($this->indexService === null) {
123
-			throw new FullTextSearchAppNotAvailableException('No IIndexService registered');
124
-		}
125
-
126
-		return $this->indexService;
127
-	}
128
-
129
-
130
-	/**
131
-	 * @return ISearchService
132
-	 * @throws FullTextSearchAppNotAvailableException
133
-	 */
134
-	private function getSearchService(): ISearchService {
135
-		if ($this->searchService === null) {
136
-			throw new FullTextSearchAppNotAvailableException('No ISearchService registered');
137
-		}
138
-
139
-		return $this->searchService;
140
-	}
141
-
142
-
143
-	/**
144
-	 * @throws FullTextSearchAppNotAvailableException
145
-	 */
146
-	public function addJavascriptAPI() {
147
-		$this->getProviderService()->addJavascriptAPI();
148
-	}
149
-
150
-
151
-	/**
152
-	 * @param string $providerId
153
-	 *
154
-	 * @return bool
155
-	 * @throws FullTextSearchAppNotAvailableException
156
-	 */
157
-	public function isProviderIndexed(string $providerId): bool {
158
-		return $this->getProviderService()->isProviderIndexed($providerId);
159
-	}
160
-
161
-
162
-	/**
163
-	 * @param string $providerId
164
-	 * @param string $documentId
165
-	 * @return IIndex
166
-	 * @throws FullTextSearchAppNotAvailableException
167
-	 */
168
-	public function getIndex(string $providerId, string $documentId): IIndex {
169
-		return $this->getIndexService()->getIndex($providerId, $documentId);
170
-	}
171
-
172
-	/**
173
-	 * @param string $providerId
174
-	 * @param string $documentId
175
-	 * @param string $userId
176
-	 * @param int $status
177
-	 *
178
-	 * @see IIndex for available value for $status.
179
-	 *
180
-	 * @return IIndex
181
-	 * @throws FullTextSearchAppNotAvailableException
182
-	 */
183
-	public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex {
184
-		return $this->getIndexService()->createIndex($providerId, $documentId, $userId, $status);
185
-	}
186
-
187
-
188
-	/**
189
-	 * @param string $providerId
190
-	 * @param string $documentId
191
-	 * @param int $status
192
-	 * @param bool $reset
193
-	 *
194
-	 * @see IIndex for available value for $status.
195
-	 *
196
-	 * @throws FullTextSearchAppNotAvailableException
197
-	 */
198
-	public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false) {
199
-		$this->getIndexService()->updateIndexStatus($providerId, $documentId, $status, $reset);
200
-	}
201
-
202
-	/**
203
-	 * @param string $providerId
204
-	 * @param array $documentIds
205
-	 * @param int $status
206
-	 * @param bool $reset
207
-	 *
208
-	 * @see IIndex for available value for $status.
209
-	 *
210
-	 * @throws FullTextSearchAppNotAvailableException
211
-	 */
212
-	public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false) {
213
-		$this->getIndexService()->updateIndexesStatus($providerId, $documentIds, $status, $reset);
214
-	}
215
-
216
-
217
-	/**
218
-	 * @param IIndex[] $indexes
219
-	 *
220
-	 * @throws FullTextSearchAppNotAvailableException
221
-	 */
222
-	public function updateIndexes(array $indexes) {
223
-		$this->getIndexService()->updateIndexes($indexes);
224
-	}
225
-
226
-
227
-	/**
228
-	 * @param array $request
229
-	 * @param string $userId
230
-	 *
231
-	 * @return ISearchResult[]
232
-	 * @throws FullTextSearchAppNotAvailableException
233
-	 */
234
-	public function search(array $request, string $userId = ''): array {
235
-		$searchRequest = $this->getSearchService()->generateSearchRequest($request);
236
-
237
-		return $this->getSearchService()->search($userId, $searchRequest);
238
-	}
51
+    /** @var IProviderService */
52
+    private $providerService;
53
+
54
+    /** @var IIndexService */
55
+    private $indexService;
56
+
57
+    /** @var ISearchService */
58
+    private $searchService;
59
+
60
+
61
+    /**
62
+     * @since 15.0.0
63
+     *
64
+     * @param IProviderService $providerService
65
+     */
66
+    public function registerProviderService(IProviderService $providerService) {
67
+        $this->providerService = $providerService;
68
+    }
69
+
70
+    /**
71
+     * @since 15.0.0
72
+     *
73
+     * @param IIndexService $indexService
74
+     */
75
+    public function registerIndexService(IIndexService $indexService) {
76
+        $this->indexService = $indexService;
77
+    }
78
+
79
+    /**
80
+     * @since 15.0.0
81
+     *
82
+     * @param ISearchService $searchService
83
+     */
84
+    public function registerSearchService(ISearchService $searchService) {
85
+        $this->searchService = $searchService;
86
+    }
87
+
88
+    /**
89
+     * @since 16.0.0
90
+     *
91
+     * @return bool
92
+     */
93
+    public function isAvailable(): bool {
94
+        if ($this->indexService === null ||
95
+            $this->providerService === null ||
96
+            $this->searchService === null) {
97
+            return false;
98
+        }
99
+
100
+        return true;
101
+    }
102
+
103
+
104
+    /**
105
+     * @return IProviderService
106
+     * @throws FullTextSearchAppNotAvailableException
107
+     */
108
+    private function getProviderService(): IProviderService {
109
+        if ($this->providerService === null) {
110
+            throw new FullTextSearchAppNotAvailableException('No IProviderService registered');
111
+        }
112
+
113
+        return $this->providerService;
114
+    }
115
+
116
+
117
+    /**
118
+     * @return IIndexService
119
+     * @throws FullTextSearchAppNotAvailableException
120
+     */
121
+    private function getIndexService(): IIndexService {
122
+        if ($this->indexService === null) {
123
+            throw new FullTextSearchAppNotAvailableException('No IIndexService registered');
124
+        }
125
+
126
+        return $this->indexService;
127
+    }
128
+
129
+
130
+    /**
131
+     * @return ISearchService
132
+     * @throws FullTextSearchAppNotAvailableException
133
+     */
134
+    private function getSearchService(): ISearchService {
135
+        if ($this->searchService === null) {
136
+            throw new FullTextSearchAppNotAvailableException('No ISearchService registered');
137
+        }
138
+
139
+        return $this->searchService;
140
+    }
141
+
142
+
143
+    /**
144
+     * @throws FullTextSearchAppNotAvailableException
145
+     */
146
+    public function addJavascriptAPI() {
147
+        $this->getProviderService()->addJavascriptAPI();
148
+    }
149
+
150
+
151
+    /**
152
+     * @param string $providerId
153
+     *
154
+     * @return bool
155
+     * @throws FullTextSearchAppNotAvailableException
156
+     */
157
+    public function isProviderIndexed(string $providerId): bool {
158
+        return $this->getProviderService()->isProviderIndexed($providerId);
159
+    }
160
+
161
+
162
+    /**
163
+     * @param string $providerId
164
+     * @param string $documentId
165
+     * @return IIndex
166
+     * @throws FullTextSearchAppNotAvailableException
167
+     */
168
+    public function getIndex(string $providerId, string $documentId): IIndex {
169
+        return $this->getIndexService()->getIndex($providerId, $documentId);
170
+    }
171
+
172
+    /**
173
+     * @param string $providerId
174
+     * @param string $documentId
175
+     * @param string $userId
176
+     * @param int $status
177
+     *
178
+     * @see IIndex for available value for $status.
179
+     *
180
+     * @return IIndex
181
+     * @throws FullTextSearchAppNotAvailableException
182
+     */
183
+    public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex {
184
+        return $this->getIndexService()->createIndex($providerId, $documentId, $userId, $status);
185
+    }
186
+
187
+
188
+    /**
189
+     * @param string $providerId
190
+     * @param string $documentId
191
+     * @param int $status
192
+     * @param bool $reset
193
+     *
194
+     * @see IIndex for available value for $status.
195
+     *
196
+     * @throws FullTextSearchAppNotAvailableException
197
+     */
198
+    public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false) {
199
+        $this->getIndexService()->updateIndexStatus($providerId, $documentId, $status, $reset);
200
+    }
201
+
202
+    /**
203
+     * @param string $providerId
204
+     * @param array $documentIds
205
+     * @param int $status
206
+     * @param bool $reset
207
+     *
208
+     * @see IIndex for available value for $status.
209
+     *
210
+     * @throws FullTextSearchAppNotAvailableException
211
+     */
212
+    public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false) {
213
+        $this->getIndexService()->updateIndexesStatus($providerId, $documentIds, $status, $reset);
214
+    }
215
+
216
+
217
+    /**
218
+     * @param IIndex[] $indexes
219
+     *
220
+     * @throws FullTextSearchAppNotAvailableException
221
+     */
222
+    public function updateIndexes(array $indexes) {
223
+        $this->getIndexService()->updateIndexes($indexes);
224
+    }
225
+
226
+
227
+    /**
228
+     * @param array $request
229
+     * @param string $userId
230
+     *
231
+     * @return ISearchResult[]
232
+     * @throws FullTextSearchAppNotAvailableException
233
+     */
234
+    public function search(array $request, string $userId = ''): array {
235
+        $searchRequest = $this->getSearchService()->generateSearchRequest($request);
236
+
237
+        return $this->getSearchService()->search($userId, $searchRequest);
238
+    }
239 239
 
240 240
 
241 241
 }
Please login to merge, or discard this patch.
apps/oauth2/lib/Db/AccessToken.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,20 +34,20 @@
 block discarded – undo
34 34
  * @method void setHashedCode(string $token)
35 35
  */
36 36
 class AccessToken extends Entity {
37
-	/** @var int */
38
-	protected $tokenId;
39
-	/** @var int */
40
-	protected $clientId;
41
-	/** @var string */
42
-	protected $hashedCode;
43
-	/** @var string */
44
-	protected $encryptedToken;
37
+    /** @var int */
38
+    protected $tokenId;
39
+    /** @var int */
40
+    protected $clientId;
41
+    /** @var string */
42
+    protected $hashedCode;
43
+    /** @var string */
44
+    protected $encryptedToken;
45 45
 
46
-	public function __construct() {
47
-		$this->addType('id', 'int');
48
-		$this->addType('tokenId', 'int');
49
-		$this->addType('clientId', 'int');
50
-		$this->addType('hashedCode', 'string');
51
-		$this->addType('encryptedToken', 'string');
52
-	}
46
+    public function __construct() {
47
+        $this->addType('id', 'int');
48
+        $this->addType('tokenId', 'int');
49
+        $this->addType('clientId', 'int');
50
+        $this->addType('hashedCode', 'string');
51
+        $this->addType('encryptedToken', 'string');
52
+    }
53 53
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -29,24 +29,24 @@
 block discarded – undo
29 29
 
30 30
 class ClearLostPasswordTokensCommand extends ALoginCommand {
31 31
 
32
-	/** @var IConfig */
33
-	private $config;
34
-
35
-	public function __construct(IConfig $config) {
36
-		$this->config = $config;
37
-	}
38
-
39
-	/**
40
-	 * User has successfully logged in, now remove the password reset link, when it is available
41
-	 */
42
-	public function process(LoginData $loginData): LoginResult {
43
-		$this->config->deleteUserValue(
44
-			$loginData->getUser()->getUID(),
45
-			'core',
46
-			'lostpassword'
47
-		);
48
-
49
-		return $this->processNextOrFinishSuccessfully($loginData);
50
-	}
32
+    /** @var IConfig */
33
+    private $config;
34
+
35
+    public function __construct(IConfig $config) {
36
+        $this->config = $config;
37
+    }
38
+
39
+    /**
40
+     * User has successfully logged in, now remove the password reset link, when it is available
41
+     */
42
+    public function process(LoginData $loginData): LoginResult {
43
+        $this->config->deleteUserValue(
44
+            $loginData->getUser()->getUID(),
45
+            'core',
46
+            'lostpassword'
47
+        );
48
+
49
+        return $this->processNextOrFinishSuccessfully($loginData);
50
+    }
51 51
 
52 52
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Login/UidLoginCommand.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -30,28 +30,28 @@
 block discarded – undo
30 30
 
31 31
 class UidLoginCommand extends ALoginCommand {
32 32
 
33
-	/** @var Manager */
34
-	private $userManager;
35
-
36
-	public function __construct(Manager $userManager) {
37
-		$this->userManager = $userManager;
38
-	}
39
-
40
-	/**
41
-	 * @param LoginData $loginData
42
-	 *
43
-	 * @return LoginResult
44
-	 */
45
-	public function process(LoginData $loginData): LoginResult {
46
-		/* @var $loginResult IUser */
47
-		$user = $this->userManager->checkPasswordNoLogging(
48
-			$loginData->getUsername(),
49
-			$loginData->getPassword()
50
-		);
51
-
52
-		$loginData->setUser($user);
53
-
54
-		return $this->processNextOrFinishSuccessfully($loginData);
55
-	}
33
+    /** @var Manager */
34
+    private $userManager;
35
+
36
+    public function __construct(Manager $userManager) {
37
+        $this->userManager = $userManager;
38
+    }
39
+
40
+    /**
41
+     * @param LoginData $loginData
42
+     *
43
+     * @return LoginResult
44
+     */
45
+    public function process(LoginData $loginData): LoginResult {
46
+        /* @var $loginResult IUser */
47
+        $user = $this->userManager->checkPasswordNoLogging(
48
+            $loginData->getUsername(),
49
+            $loginData->getPassword()
50
+        );
51
+
52
+        $loginData->setUser($user);
53
+
54
+        return $this->processNextOrFinishSuccessfully($loginData);
55
+    }
56 56
 
57 57
 }
Please login to merge, or discard this patch.