Completed
Pull Request — stable9 (#4226)
by Lukas
11:11
created
lib/public/capabilities/icapability.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
  */
37 37
 interface ICapability {
38 38
 
39
-	/**
40
-	 * Function an app uses to return the capabilities
41
-	 *
42
-	 * @return array Array containing the apps capabilities
43
-	 * @since 8.2.0
44
-	 */
45
-	public function getCapabilities();
39
+    /**
40
+     * Function an app uses to return the capabilities
41
+     *
42
+     * @return array Array containing the apps capabilities
43
+     * @since 8.2.0
44
+     */
45
+    public function getCapabilities();
46 46
 }
47 47
 
Please login to merge, or discard this patch.
lib/public/imemcache.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -37,55 +37,55 @@
 block discarded – undo
37 37
  * @since 8.1.0
38 38
  */
39 39
 interface IMemcache extends ICache {
40
-	/**
41
-	 * Set a value in the cache if it's not already stored
42
-	 *
43
-	 * @param string $key
44
-	 * @param mixed $value
45
-	 * @param int $ttl Time To Live in seconds. Defaults to 60*60*24
46
-	 * @return bool
47
-	 * @since 8.1.0
48
-	 */
49
-	public function add($key, $value, $ttl = 0);
40
+    /**
41
+     * Set a value in the cache if it's not already stored
42
+     *
43
+     * @param string $key
44
+     * @param mixed $value
45
+     * @param int $ttl Time To Live in seconds. Defaults to 60*60*24
46
+     * @return bool
47
+     * @since 8.1.0
48
+     */
49
+    public function add($key, $value, $ttl = 0);
50 50
 
51
-	/**
52
-	 * Increase a stored number
53
-	 *
54
-	 * @param string $key
55
-	 * @param int $step
56
-	 * @return int | bool
57
-	 * @since 8.1.0
58
-	 */
59
-	public function inc($key, $step = 1);
51
+    /**
52
+     * Increase a stored number
53
+     *
54
+     * @param string $key
55
+     * @param int $step
56
+     * @return int | bool
57
+     * @since 8.1.0
58
+     */
59
+    public function inc($key, $step = 1);
60 60
 
61
-	/**
62
-	 * Decrease a stored number
63
-	 *
64
-	 * @param string $key
65
-	 * @param int $step
66
-	 * @return int | bool
67
-	 * @since 8.1.0
68
-	 */
69
-	public function dec($key, $step = 1);
61
+    /**
62
+     * Decrease a stored number
63
+     *
64
+     * @param string $key
65
+     * @param int $step
66
+     * @return int | bool
67
+     * @since 8.1.0
68
+     */
69
+    public function dec($key, $step = 1);
70 70
 
71
-	/**
72
-	 * Compare and set
73
-	 *
74
-	 * @param string $key
75
-	 * @param mixed $old
76
-	 * @param mixed $new
77
-	 * @return bool
78
-	 * @since 8.1.0
79
-	 */
80
-	public function cas($key, $old, $new);
71
+    /**
72
+     * Compare and set
73
+     *
74
+     * @param string $key
75
+     * @param mixed $old
76
+     * @param mixed $new
77
+     * @return bool
78
+     * @since 8.1.0
79
+     */
80
+    public function cas($key, $old, $new);
81 81
 
82
-	/**
83
-	 * Compare and delete
84
-	 *
85
-	 * @param string $key
86
-	 * @param mixed $old
87
-	 * @return bool
88
-	 * @since 8.1.0
89
-	 */
90
-	public function cad($key, $old);
82
+    /**
83
+     * Compare and delete
84
+     *
85
+     * @param string $key
86
+     * @param mixed $old
87
+     * @return bool
88
+     * @since 8.1.0
89
+     */
90
+    public function cad($key, $old);
91 91
 }
Please login to merge, or discard this patch.
lib/public/comments/icomment.php 1 patch
Indentation   +205 added lines, -205 removed lines patch added patch discarded remove patch
@@ -31,211 +31,211 @@
 block discarded – undo
31 31
  * @since 9.0.0
32 32
  */
33 33
 interface IComment {
34
-	const MAX_MESSAGE_LENGTH = 1000;
35
-
36
-	/**
37
-	 * returns the ID of the comment
38
-	 *
39
-	 * It may return an empty string, if the comment was not stored.
40
-	 * It is expected that the concrete Comment implementation gives an ID
41
-	 * by itself (e.g. after saving).
42
-	 *
43
-	 * @return string
44
-	 * @since 9.0.0
45
-	 */
46
-	public function getId();
47
-
48
-	/**
49
-	 * sets the ID of the comment and returns itself
50
-	 *
51
-	 * It is only allowed to set the ID only, if the current id is an empty
52
-	 * string (which means it is not stored in a database, storage or whatever
53
-	 * the concrete implementation does), or vice versa. Changing a given ID is
54
-	 * not permitted and must result in an IllegalIDChangeException.
55
-	 *
56
-	 * @param string $id
57
-	 * @return IComment
58
-	 * @throws IllegalIDChangeException
59
-	 * @since 9.0.0
60
-	 */
61
-	public function setId($id);
62
-
63
-	/**
64
-	 * returns the parent ID of the comment
65
-	 *
66
-	 * @return string
67
-	 * @since 9.0.0
68
-	 */
69
-	public function getParentId();
70
-
71
-	/**
72
-	 * sets the parent ID and returns itself
73
-	 * @param string $parentId
74
-	 * @return IComment
75
-	 * @since 9.0.0
76
-	 */
77
-	public function setParentId($parentId);
78
-
79
-	/**
80
-	 * returns the topmost parent ID of the comment
81
-	 *
82
-	 * @return string
83
-	 * @since 9.0.0
84
-	 */
85
-	public function getTopmostParentId();
86
-
87
-
88
-	/**
89
-	 * sets the topmost parent ID and returns itself
90
-	 *
91
-	 * @param string $id
92
-	 * @return IComment
93
-	 * @since 9.0.0
94
-	 */
95
-	public function setTopmostParentId($id);
96
-
97
-	/**
98
-	 * returns the number of children
99
-	 *
100
-	 * @return int
101
-	 * @since 9.0.0
102
-	 */
103
-	public function getChildrenCount();
104
-
105
-	/**
106
-	 * sets the number of children
107
-	 *
108
-	 * @param int $count
109
-	 * @return IComment
110
-	 * @since 9.0.0
111
-	 */
112
-	public function setChildrenCount($count);
113
-
114
-	/**
115
-	 * returns the message of the comment
116
-	 *
117
-	 * @return string
118
-	 * @since 9.0.0
119
-	 */
120
-	public function getMessage();
121
-
122
-	/**
123
-	 * sets the message of the comment and returns itself
124
-	 *
125
-	 * When the given message length exceeds MAX_MESSAGE_LENGTH an
126
-	 * MessageTooLongException shall be thrown.
127
-	 *
128
-	 * @param string $message
129
-	 * @return IComment
130
-	 * @throws MessageTooLongException
131
-	 * @since 9.0.0
132
-	 */
133
-	public function setMessage($message);
134
-
135
-	/**
136
-	 * returns the verb of the comment
137
-	 *
138
-	 * @return string
139
-	 * @since 9.0.0
140
-	 */
141
-	public function getVerb();
142
-
143
-	/**
144
-	 * sets the verb of the comment, e.g. 'comment' or 'like'
145
-	 *
146
-	 * @param string $verb
147
-	 * @return IComment
148
-	 * @since 9.0.0
149
-	 */
150
-	public function setVerb($verb);
151
-
152
-	/**
153
-	 * returns the actor type
154
-	 *
155
-	 * @return string
156
-	 * @since 9.0.0
157
-	 */
158
-	public function getActorType();
159
-
160
-	/**
161
-	 * returns the actor ID
162
-	 *
163
-	 * @return string
164
-	 * @since 9.0.0
165
-	 */
166
-	public function getActorId();
167
-
168
-	/**
169
-	 * sets (overwrites) the actor type and id
170
-	 *
171
-	 * @param string $actorType e.g. 'users'
172
-	 * @param string $actorId e.g. 'zombie234'
173
-	 * @return IComment
174
-	 * @since 9.0.0
175
-	 */
176
-	public function setActor($actorType, $actorId);
177
-
178
-	/**
179
-	 * returns the creation date of the comment.
180
-	 *
181
-	 * If not explicitly set, it shall default to the time of initialization.
182
-	 *
183
-	 * @return \DateTime
184
-	 * @since 9.0.0
185
-	 */
186
-	public function getCreationDateTime();
187
-
188
-	/**
189
-	 * sets the creation date of the comment and returns itself
190
-	 *
191
-	 * @param \DateTime $dateTime
192
-	 * @return IComment
193
-	 * @since 9.0.0
194
-	 */
195
-	public function setCreationDateTime(\DateTime $dateTime);
196
-
197
-	/**
198
-	 * returns the date of the most recent child
199
-	 *
200
-	 * @return \DateTime
201
-	 * @since 9.0.0
202
-	 */
203
-	public function getLatestChildDateTime();
204
-
205
-	/**
206
-	 * sets the date of the most recent child
207
-	 *
208
-	 * @param \DateTime $dateTime
209
-	 * @return IComment
210
-	 * @since 9.0.0
211
-	 */
212
-	public function setLatestChildDateTime(\DateTime $dateTime);
213
-
214
-	/**
215
-	 * returns the object type the comment is attached to
216
-	 *
217
-	 * @return string
218
-	 * @since 9.0.0
219
-	 */
220
-	public function getObjectType();
221
-
222
-	/**
223
-	 * returns the object id the comment is attached to
224
-	 *
225
-	 * @return string
226
-	 * @since 9.0.0
227
-	 */
228
-	public function getObjectId();
229
-
230
-	/**
231
-	 * sets (overwrites) the object of the comment
232
-	 *
233
-	 * @param string $objectType e.g. 'files'
234
-	 * @param string $objectId e.g. '16435'
235
-	 * @return IComment
236
-	 * @since 9.0.0
237
-	 */
238
-	public function setObject($objectType, $objectId);
34
+    const MAX_MESSAGE_LENGTH = 1000;
35
+
36
+    /**
37
+     * returns the ID of the comment
38
+     *
39
+     * It may return an empty string, if the comment was not stored.
40
+     * It is expected that the concrete Comment implementation gives an ID
41
+     * by itself (e.g. after saving).
42
+     *
43
+     * @return string
44
+     * @since 9.0.0
45
+     */
46
+    public function getId();
47
+
48
+    /**
49
+     * sets the ID of the comment and returns itself
50
+     *
51
+     * It is only allowed to set the ID only, if the current id is an empty
52
+     * string (which means it is not stored in a database, storage or whatever
53
+     * the concrete implementation does), or vice versa. Changing a given ID is
54
+     * not permitted and must result in an IllegalIDChangeException.
55
+     *
56
+     * @param string $id
57
+     * @return IComment
58
+     * @throws IllegalIDChangeException
59
+     * @since 9.0.0
60
+     */
61
+    public function setId($id);
62
+
63
+    /**
64
+     * returns the parent ID of the comment
65
+     *
66
+     * @return string
67
+     * @since 9.0.0
68
+     */
69
+    public function getParentId();
70
+
71
+    /**
72
+     * sets the parent ID and returns itself
73
+     * @param string $parentId
74
+     * @return IComment
75
+     * @since 9.0.0
76
+     */
77
+    public function setParentId($parentId);
78
+
79
+    /**
80
+     * returns the topmost parent ID of the comment
81
+     *
82
+     * @return string
83
+     * @since 9.0.0
84
+     */
85
+    public function getTopmostParentId();
86
+
87
+
88
+    /**
89
+     * sets the topmost parent ID and returns itself
90
+     *
91
+     * @param string $id
92
+     * @return IComment
93
+     * @since 9.0.0
94
+     */
95
+    public function setTopmostParentId($id);
96
+
97
+    /**
98
+     * returns the number of children
99
+     *
100
+     * @return int
101
+     * @since 9.0.0
102
+     */
103
+    public function getChildrenCount();
104
+
105
+    /**
106
+     * sets the number of children
107
+     *
108
+     * @param int $count
109
+     * @return IComment
110
+     * @since 9.0.0
111
+     */
112
+    public function setChildrenCount($count);
113
+
114
+    /**
115
+     * returns the message of the comment
116
+     *
117
+     * @return string
118
+     * @since 9.0.0
119
+     */
120
+    public function getMessage();
121
+
122
+    /**
123
+     * sets the message of the comment and returns itself
124
+     *
125
+     * When the given message length exceeds MAX_MESSAGE_LENGTH an
126
+     * MessageTooLongException shall be thrown.
127
+     *
128
+     * @param string $message
129
+     * @return IComment
130
+     * @throws MessageTooLongException
131
+     * @since 9.0.0
132
+     */
133
+    public function setMessage($message);
134
+
135
+    /**
136
+     * returns the verb of the comment
137
+     *
138
+     * @return string
139
+     * @since 9.0.0
140
+     */
141
+    public function getVerb();
142
+
143
+    /**
144
+     * sets the verb of the comment, e.g. 'comment' or 'like'
145
+     *
146
+     * @param string $verb
147
+     * @return IComment
148
+     * @since 9.0.0
149
+     */
150
+    public function setVerb($verb);
151
+
152
+    /**
153
+     * returns the actor type
154
+     *
155
+     * @return string
156
+     * @since 9.0.0
157
+     */
158
+    public function getActorType();
159
+
160
+    /**
161
+     * returns the actor ID
162
+     *
163
+     * @return string
164
+     * @since 9.0.0
165
+     */
166
+    public function getActorId();
167
+
168
+    /**
169
+     * sets (overwrites) the actor type and id
170
+     *
171
+     * @param string $actorType e.g. 'users'
172
+     * @param string $actorId e.g. 'zombie234'
173
+     * @return IComment
174
+     * @since 9.0.0
175
+     */
176
+    public function setActor($actorType, $actorId);
177
+
178
+    /**
179
+     * returns the creation date of the comment.
180
+     *
181
+     * If not explicitly set, it shall default to the time of initialization.
182
+     *
183
+     * @return \DateTime
184
+     * @since 9.0.0
185
+     */
186
+    public function getCreationDateTime();
187
+
188
+    /**
189
+     * sets the creation date of the comment and returns itself
190
+     *
191
+     * @param \DateTime $dateTime
192
+     * @return IComment
193
+     * @since 9.0.0
194
+     */
195
+    public function setCreationDateTime(\DateTime $dateTime);
196
+
197
+    /**
198
+     * returns the date of the most recent child
199
+     *
200
+     * @return \DateTime
201
+     * @since 9.0.0
202
+     */
203
+    public function getLatestChildDateTime();
204
+
205
+    /**
206
+     * sets the date of the most recent child
207
+     *
208
+     * @param \DateTime $dateTime
209
+     * @return IComment
210
+     * @since 9.0.0
211
+     */
212
+    public function setLatestChildDateTime(\DateTime $dateTime);
213
+
214
+    /**
215
+     * returns the object type the comment is attached to
216
+     *
217
+     * @return string
218
+     * @since 9.0.0
219
+     */
220
+    public function getObjectType();
221
+
222
+    /**
223
+     * returns the object id the comment is attached to
224
+     *
225
+     * @return string
226
+     * @since 9.0.0
227
+     */
228
+    public function getObjectId();
229
+
230
+    /**
231
+     * sets (overwrites) the object of the comment
232
+     *
233
+     * @param string $objectType e.g. 'files'
234
+     * @param string $objectId e.g. '16435'
235
+     * @return IComment
236
+     * @since 9.0.0
237
+     */
238
+    public function setObject($objectType, $objectId);
239 239
 
240 240
 }
241 241
 
Please login to merge, or discard this patch.
lib/public/comments/icommentsmanager.php 1 patch
Indentation   +203 added lines, -203 removed lines patch added patch discarded remove patch
@@ -33,208 +33,208 @@
 block discarded – undo
33 33
  */
34 34
 interface ICommentsManager {
35 35
 
36
-	/**
37
-	 * @const DELETED_USER type and id for a user that has been deleted
38
-	 * @see deleteReferencesOfActor
39
-	 * @since 9.0.0
40
-	 *
41
-	 * To be used as replacement for user type actors in deleteReferencesOfActor().
42
-	 *
43
-	 * User interfaces shall show "Deleted user" as display name, if needed.
44
-	 */
45
-	const DELETED_USER = 'deleted_users';
46
-
47
-	/**
48
-	 * returns a comment instance
49
-	 *
50
-	 * @param string $id the ID of the comment
51
-	 * @return IComment
52
-	 * @throws NotFoundException
53
-	 * @since 9.0.0
54
-	 */
55
-	public function get($id);
56
-
57
-	/**
58
-	 * returns the comment specified by the id and all it's child comments
59
-	 *
60
-	 * @param string $id
61
-	 * @param int $limit max number of entries to return, 0 returns all
62
-	 * @param int $offset the start entry
63
-	 * @return array
64
-	 * @since 9.0.0
65
-	 *
66
-	 * The return array looks like this
67
-	 * [
68
-	 * 	 'comment' => IComment, // root comment
69
-	 *   'replies' =>
70
-	 *   [
71
-	 *     0 =>
72
-	 *     [
73
-	 *       'comment' => IComment,
74
-	 *       'replies' =>
75
-	 *       [
76
-	 *         0 =>
77
-	 *         [
78
-	 *           'comment' => IComment,
79
-	 *           'replies' => [ … ]
80
-	 *         ],
81
-	 *         …
82
-	 *       ]
83
-	 *     ]
84
-	 *     1 =>
85
-	 *     [
86
-	 *       'comment' => IComment,
87
-	 *       'replies'=> [ … ]
88
-	 *     ],
89
-	 *     …
90
-	 *   ]
91
-	 * ]
92
-	 */
93
-	public function getTree($id, $limit = 0, $offset = 0);
94
-
95
-	/**
96
-	 * returns comments for a specific object (e.g. a file).
97
-	 *
98
-	 * The sort order is always newest to oldest.
99
-	 *
100
-	 * @param string $objectType the object type, e.g. 'files'
101
-	 * @param string $objectId the id of the object
102
-	 * @param int $limit optional, number of maximum comments to be returned. if
103
-	 * not specified, all comments are returned.
104
-	 * @param int $offset optional, starting point
105
-	 * @param \DateTime $notOlderThan optional, timestamp of the oldest comments
106
-	 * that may be returned
107
-	 * @return IComment[]
108
-	 * @since 9.0.0
109
-	 */
110
-	public function getForObject(
111
-			$objectType,
112
-			$objectId,
113
-			$limit = 0,
114
-			$offset = 0,
115
-			\DateTime $notOlderThan = null
116
-	);
117
-
118
-	/**
119
-	 * @param $objectType string the object type, e.g. 'files'
120
-	 * @param $objectId string the id of the object
121
-	 * @param \DateTime $notOlderThan optional, timestamp of the oldest comments
122
-	 * that may be returned
123
-	 * @return Int
124
-	 * @since 9.0.0
125
-	 */
126
-	public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null);
127
-
128
-	/**
129
-	 * creates a new comment and returns it. At this point of time, it is not
130
-	 * saved in the used data storage. Use save() after setting other fields
131
-	 * of the comment (e.g. message or verb).
132
-	 *
133
-	 * @param string $actorType the actor type (e.g. 'users')
134
-	 * @param string $actorId a user id
135
-	 * @param string $objectType the object type the comment is attached to
136
-	 * @param string $objectId the object id the comment is attached to
137
-	 * @return IComment
138
-	 * @since 9.0.0
139
-	 */
140
-	public function create($actorType, $actorId, $objectType, $objectId);
141
-
142
-	/**
143
-	 * permanently deletes the comment specified by the ID
144
-	 *
145
-	 * When the comment has child comments, their parent ID will be changed to
146
-	 * the parent ID of the item that is to be deleted.
147
-	 *
148
-	 * @param string $id
149
-	 * @return bool
150
-	 * @since 9.0.0
151
-	 */
152
-	public function delete($id);
153
-
154
-	/**
155
-	 * saves the comment permanently
156
-	 *
157
-	 * if the supplied comment has an empty ID, a new entry comment will be
158
-	 * saved and the instance updated with the new ID.
159
-	 *
160
-	 * Otherwise, an existing comment will be updated.
161
-	 *
162
-	 * Throws NotFoundException when a comment that is to be updated does not
163
-	 * exist anymore at this point of time.
164
-	 *
165
-	 * @param IComment $comment
166
-	 * @return bool
167
-	 * @throws NotFoundException
168
-	 * @since 9.0.0
169
-	 */
170
-	public function save(IComment $comment);
171
-
172
-	/**
173
-	 * removes references to specific actor (e.g. on user delete) of a comment.
174
-	 * The comment itself must not get lost/deleted.
175
-	 *
176
-	 * A 'users' type actor (type and id) should get replaced by the
177
-	 * value of the DELETED_USER constant of this interface.
178
-	 *
179
-	 * @param string $actorType the actor type (e.g. 'users')
180
-	 * @param string $actorId a user id
181
-	 * @return boolean
182
-	 * @since 9.0.0
183
-	 */
184
-	public function deleteReferencesOfActor($actorType, $actorId);
185
-
186
-	/**
187
-	 * deletes all comments made of a specific object (e.g. on file delete)
188
-	 *
189
-	 * @param string $objectType the object type (e.g. 'files')
190
-	 * @param string $objectId e.g. the file id
191
-	 * @return boolean
192
-	 * @since 9.0.0
193
-	 */
194
-	public function deleteCommentsAtObject($objectType, $objectId);
195
-
196
-	/**
197
-	 * sets the read marker for a given file to the specified date for the
198
-	 * provided user
199
-	 *
200
-	 * @param string $objectType
201
-	 * @param string $objectId
202
-	 * @param \DateTime $dateTime
203
-	 * @param \OCP\IUser $user
204
-	 * @since 9.0.0
205
-	 */
206
-	public function setReadMark($objectType, $objectId, \DateTime $dateTime, \OCP\IUser $user);
207
-
208
-	/**
209
-	 * returns the read marker for a given file to the specified date for the
210
-	 * provided user. It returns null, when the marker is not present, i.e.
211
-	 * no comments were marked as read.
212
-	 *
213
-	 * @param string $objectType
214
-	 * @param string $objectId
215
-	 * @param \OCP\IUser $user
216
-	 * @return \DateTime|null
217
-	 * @since 9.0.0
218
-	 */
219
-	public function getReadMark($objectType, $objectId, \OCP\IUser $user);
220
-
221
-	/**
222
-	 * deletes the read markers for the specified user
223
-	 *
224
-	 * @param \OCP\IUser $user
225
-	 * @return bool
226
-	 * @since 9.0.0
227
-	 */
228
-	public function deleteReadMarksFromUser(\OCP\IUser $user);
229
-
230
-	/**
231
-	 * deletes the read markers on the specified object
232
-	 *
233
-	 * @param string $objectType
234
-	 * @param string $objectId
235
-	 * @return bool
236
-	 * @since 9.0.0
237
-	 */
238
-	public function deleteReadMarksOnObject($objectType, $objectId);
36
+    /**
37
+     * @const DELETED_USER type and id for a user that has been deleted
38
+     * @see deleteReferencesOfActor
39
+     * @since 9.0.0
40
+     *
41
+     * To be used as replacement for user type actors in deleteReferencesOfActor().
42
+     *
43
+     * User interfaces shall show "Deleted user" as display name, if needed.
44
+     */
45
+    const DELETED_USER = 'deleted_users';
46
+
47
+    /**
48
+     * returns a comment instance
49
+     *
50
+     * @param string $id the ID of the comment
51
+     * @return IComment
52
+     * @throws NotFoundException
53
+     * @since 9.0.0
54
+     */
55
+    public function get($id);
56
+
57
+    /**
58
+     * returns the comment specified by the id and all it's child comments
59
+     *
60
+     * @param string $id
61
+     * @param int $limit max number of entries to return, 0 returns all
62
+     * @param int $offset the start entry
63
+     * @return array
64
+     * @since 9.0.0
65
+     *
66
+     * The return array looks like this
67
+     * [
68
+     * 	 'comment' => IComment, // root comment
69
+     *   'replies' =>
70
+     *   [
71
+     *     0 =>
72
+     *     [
73
+     *       'comment' => IComment,
74
+     *       'replies' =>
75
+     *       [
76
+     *         0 =>
77
+     *         [
78
+     *           'comment' => IComment,
79
+     *           'replies' => [ … ]
80
+     *         ],
81
+     *         …
82
+     *       ]
83
+     *     ]
84
+     *     1 =>
85
+     *     [
86
+     *       'comment' => IComment,
87
+     *       'replies'=> [ … ]
88
+     *     ],
89
+     *     …
90
+     *   ]
91
+     * ]
92
+     */
93
+    public function getTree($id, $limit = 0, $offset = 0);
94
+
95
+    /**
96
+     * returns comments for a specific object (e.g. a file).
97
+     *
98
+     * The sort order is always newest to oldest.
99
+     *
100
+     * @param string $objectType the object type, e.g. 'files'
101
+     * @param string $objectId the id of the object
102
+     * @param int $limit optional, number of maximum comments to be returned. if
103
+     * not specified, all comments are returned.
104
+     * @param int $offset optional, starting point
105
+     * @param \DateTime $notOlderThan optional, timestamp of the oldest comments
106
+     * that may be returned
107
+     * @return IComment[]
108
+     * @since 9.0.0
109
+     */
110
+    public function getForObject(
111
+            $objectType,
112
+            $objectId,
113
+            $limit = 0,
114
+            $offset = 0,
115
+            \DateTime $notOlderThan = null
116
+    );
117
+
118
+    /**
119
+     * @param $objectType string the object type, e.g. 'files'
120
+     * @param $objectId string the id of the object
121
+     * @param \DateTime $notOlderThan optional, timestamp of the oldest comments
122
+     * that may be returned
123
+     * @return Int
124
+     * @since 9.0.0
125
+     */
126
+    public function getNumberOfCommentsForObject($objectType, $objectId, \DateTime $notOlderThan = null);
127
+
128
+    /**
129
+     * creates a new comment and returns it. At this point of time, it is not
130
+     * saved in the used data storage. Use save() after setting other fields
131
+     * of the comment (e.g. message or verb).
132
+     *
133
+     * @param string $actorType the actor type (e.g. 'users')
134
+     * @param string $actorId a user id
135
+     * @param string $objectType the object type the comment is attached to
136
+     * @param string $objectId the object id the comment is attached to
137
+     * @return IComment
138
+     * @since 9.0.0
139
+     */
140
+    public function create($actorType, $actorId, $objectType, $objectId);
141
+
142
+    /**
143
+     * permanently deletes the comment specified by the ID
144
+     *
145
+     * When the comment has child comments, their parent ID will be changed to
146
+     * the parent ID of the item that is to be deleted.
147
+     *
148
+     * @param string $id
149
+     * @return bool
150
+     * @since 9.0.0
151
+     */
152
+    public function delete($id);
153
+
154
+    /**
155
+     * saves the comment permanently
156
+     *
157
+     * if the supplied comment has an empty ID, a new entry comment will be
158
+     * saved and the instance updated with the new ID.
159
+     *
160
+     * Otherwise, an existing comment will be updated.
161
+     *
162
+     * Throws NotFoundException when a comment that is to be updated does not
163
+     * exist anymore at this point of time.
164
+     *
165
+     * @param IComment $comment
166
+     * @return bool
167
+     * @throws NotFoundException
168
+     * @since 9.0.0
169
+     */
170
+    public function save(IComment $comment);
171
+
172
+    /**
173
+     * removes references to specific actor (e.g. on user delete) of a comment.
174
+     * The comment itself must not get lost/deleted.
175
+     *
176
+     * A 'users' type actor (type and id) should get replaced by the
177
+     * value of the DELETED_USER constant of this interface.
178
+     *
179
+     * @param string $actorType the actor type (e.g. 'users')
180
+     * @param string $actorId a user id
181
+     * @return boolean
182
+     * @since 9.0.0
183
+     */
184
+    public function deleteReferencesOfActor($actorType, $actorId);
185
+
186
+    /**
187
+     * deletes all comments made of a specific object (e.g. on file delete)
188
+     *
189
+     * @param string $objectType the object type (e.g. 'files')
190
+     * @param string $objectId e.g. the file id
191
+     * @return boolean
192
+     * @since 9.0.0
193
+     */
194
+    public function deleteCommentsAtObject($objectType, $objectId);
195
+
196
+    /**
197
+     * sets the read marker for a given file to the specified date for the
198
+     * provided user
199
+     *
200
+     * @param string $objectType
201
+     * @param string $objectId
202
+     * @param \DateTime $dateTime
203
+     * @param \OCP\IUser $user
204
+     * @since 9.0.0
205
+     */
206
+    public function setReadMark($objectType, $objectId, \DateTime $dateTime, \OCP\IUser $user);
207
+
208
+    /**
209
+     * returns the read marker for a given file to the specified date for the
210
+     * provided user. It returns null, when the marker is not present, i.e.
211
+     * no comments were marked as read.
212
+     *
213
+     * @param string $objectType
214
+     * @param string $objectId
215
+     * @param \OCP\IUser $user
216
+     * @return \DateTime|null
217
+     * @since 9.0.0
218
+     */
219
+    public function getReadMark($objectType, $objectId, \OCP\IUser $user);
220
+
221
+    /**
222
+     * deletes the read markers for the specified user
223
+     *
224
+     * @param \OCP\IUser $user
225
+     * @return bool
226
+     * @since 9.0.0
227
+     */
228
+    public function deleteReadMarksFromUser(\OCP\IUser $user);
229
+
230
+    /**
231
+     * deletes the read markers on the specified object
232
+     *
233
+     * @param string $objectType
234
+     * @param string $objectId
235
+     * @return bool
236
+     * @since 9.0.0
237
+     */
238
+    public function deleteReadMarksOnObject($objectType, $objectId);
239 239
 
240 240
 }
Please login to merge, or discard this patch.
lib/public/comments/commentsevent.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -32,40 +32,40 @@
 block discarded – undo
32 32
  */
33 33
 class CommentsEvent extends Event {
34 34
 
35
-	const EVENT_ADD = 'OCP\Comments\ICommentsManager::addComment';
36
-	const EVENT_UPDATE = 'OCP\Comments\ICommentsManager::updateComment';
37
-	const EVENT_DELETE = 'OCP\Comments\ICommentsManager::deleteComment';
35
+    const EVENT_ADD = 'OCP\Comments\ICommentsManager::addComment';
36
+    const EVENT_UPDATE = 'OCP\Comments\ICommentsManager::updateComment';
37
+    const EVENT_DELETE = 'OCP\Comments\ICommentsManager::deleteComment';
38 38
 
39
-	/** @var string */
40
-	protected $event;
41
-	/** @var IComment */
42
-	protected $comment;
39
+    /** @var string */
40
+    protected $event;
41
+    /** @var IComment */
42
+    protected $comment;
43 43
 
44
-	/**
45
-	 * DispatcherEvent constructor.
46
-	 *
47
-	 * @param string $event
48
-	 * @param IComment $comment
49
-	 * @since 9.0.0
50
-	 */
51
-	public function __construct($event, IComment $comment) {
52
-		$this->event = $event;
53
-		$this->comment = $comment;
54
-	}
44
+    /**
45
+     * DispatcherEvent constructor.
46
+     *
47
+     * @param string $event
48
+     * @param IComment $comment
49
+     * @since 9.0.0
50
+     */
51
+    public function __construct($event, IComment $comment) {
52
+        $this->event = $event;
53
+        $this->comment = $comment;
54
+    }
55 55
 
56
-	/**
57
-	 * @return string
58
-	 * @since 9.0.0
59
-	 */
60
-	public function getEvent() {
61
-		return $this->event;
62
-	}
56
+    /**
57
+     * @return string
58
+     * @since 9.0.0
59
+     */
60
+    public function getEvent() {
61
+        return $this->event;
62
+    }
63 63
 
64
-	/**
65
-	 * @return IComment
66
-	 * @since 9.0.0
67
-	 */
68
-	public function getComment() {
69
-		return $this->comment;
70
-	}
64
+    /**
65
+     * @return IComment
66
+     * @since 9.0.0
67
+     */
68
+    public function getComment() {
69
+        return $this->comment;
70
+    }
71 71
 }
Please login to merge, or discard this patch.
lib/public/comments/icommentsmanagerfactory.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -36,19 +36,19 @@
 block discarded – undo
36 36
  */
37 37
 interface ICommentsManagerFactory {
38 38
 
39
-	/**
40
-	 * Constructor for the comments manager factory
41
-	 *
42
-	 * @param IServerContainer $serverContainer server container
43
-	 * @since 9.0.0
44
-	 */
45
-	public function __construct(IServerContainer $serverContainer);
39
+    /**
40
+     * Constructor for the comments manager factory
41
+     *
42
+     * @param IServerContainer $serverContainer server container
43
+     * @since 9.0.0
44
+     */
45
+    public function __construct(IServerContainer $serverContainer);
46 46
 
47
-	/**
48
-	 * creates and returns an instance of the ICommentsManager
49
-	 *
50
-	 * @return ICommentsManager
51
-	 * @since 9.0.0
52
-	 */
53
-	public function getManager();
47
+    /**
48
+     * creates and returns an instance of the ICommentsManager
49
+     *
50
+     * @return ICommentsManager
51
+     * @since 9.0.0
52
+     */
53
+    public function getManager();
54 54
 }
Please login to merge, or discard this patch.
lib/public/json.php 2 patches
Indentation   +145 added lines, -145 removed lines patch added patch discarded remove patch
@@ -40,158 +40,158 @@
 block discarded – undo
40 40
  * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
41 41
  */
42 42
 class JSON {
43
-	/**
44
-	 * Encode and print $data in JSON format
45
-	 * @param array $data The data to use
46
-	 * @param bool $setContentType the optional content type
47
-	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
48
-	 */
49
-	public static function encodedPrint( $data, $setContentType=true ) {
50
-		\OC_JSON::encodedPrint($data, $setContentType);
51
-	}
43
+    /**
44
+     * Encode and print $data in JSON format
45
+     * @param array $data The data to use
46
+     * @param bool $setContentType the optional content type
47
+     * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
48
+     */
49
+    public static function encodedPrint( $data, $setContentType=true ) {
50
+        \OC_JSON::encodedPrint($data, $setContentType);
51
+    }
52 52
 
53
-	/**
54
-	 * Check if the user is logged in, send json error msg if not.
55
-	 *
56
-	 * This method checks if a user is logged in. If not, a json error
57
-	 * response will be return and the method will exit from execution
58
-	 * of the script.
59
-	 * The returned json will be in the format:
60
-	 *
61
-	 *     {"status":"error","data":{"message":"Authentication error."}}
62
-	 *
63
-	 * Add this call to the start of all ajax method files that requires
64
-	 * an authenticated user.
65
-	 * @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead
66
-	 */
67
-	public static function checkLoggedIn() {
68
-		\OC_JSON::checkLoggedIn();
69
-	}
53
+    /**
54
+     * Check if the user is logged in, send json error msg if not.
55
+     *
56
+     * This method checks if a user is logged in. If not, a json error
57
+     * response will be return and the method will exit from execution
58
+     * of the script.
59
+     * The returned json will be in the format:
60
+     *
61
+     *     {"status":"error","data":{"message":"Authentication error."}}
62
+     *
63
+     * Add this call to the start of all ajax method files that requires
64
+     * an authenticated user.
65
+     * @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead
66
+     */
67
+    public static function checkLoggedIn() {
68
+        \OC_JSON::checkLoggedIn();
69
+    }
70 70
 
71
-	/**
72
-	 * Check an ajax get/post call if the request token is valid.
73
-	 *
74
-	 * This method checks for a valid variable 'requesttoken' in $_GET,
75
-	 * $_POST and $_SERVER. If a valid token is not found, a json error
76
-	 * response will be return and the method will exit from execution
77
-	 * of the script.
78
-	 * The returned json will be in the format:
79
-	 *
80
-	 *     {"status":"error","data":{"message":"Token expired. Please reload page."}}
81
-	 *
82
-	 * Add this call to the start of all ajax method files that creates,
83
-	 * updates or deletes anything.
84
-	 * In cases where you e.g. use an ajax call to load a dialog containing
85
-	 * a submittable form, you will need to add the requesttoken first as a
86
-	 * parameter to the ajax call, then assign it to the template and finally
87
-	 * add a hidden input field also named 'requesttoken' containing the value.
88
-	 * @deprecated 8.1.0 Use annotation based CSRF checks from the AppFramework instead
89
-	 */
90
-	public static function callCheck() {
91
-		\OC_JSON::callCheck();
92
-	}
71
+    /**
72
+     * Check an ajax get/post call if the request token is valid.
73
+     *
74
+     * This method checks for a valid variable 'requesttoken' in $_GET,
75
+     * $_POST and $_SERVER. If a valid token is not found, a json error
76
+     * response will be return and the method will exit from execution
77
+     * of the script.
78
+     * The returned json will be in the format:
79
+     *
80
+     *     {"status":"error","data":{"message":"Token expired. Please reload page."}}
81
+     *
82
+     * Add this call to the start of all ajax method files that creates,
83
+     * updates or deletes anything.
84
+     * In cases where you e.g. use an ajax call to load a dialog containing
85
+     * a submittable form, you will need to add the requesttoken first as a
86
+     * parameter to the ajax call, then assign it to the template and finally
87
+     * add a hidden input field also named 'requesttoken' containing the value.
88
+     * @deprecated 8.1.0 Use annotation based CSRF checks from the AppFramework instead
89
+     */
90
+    public static function callCheck() {
91
+        \OC_JSON::callCheck();
92
+    }
93 93
 
94
-	/**
95
-	 * Send json success msg
96
-	 *
97
-	 * Return a json success message with optional extra data.
98
-	 * @see OCP\JSON::error()		for the format to use.
99
-	 *
100
-	 * @param array $data The data to use
101
-	 * @return string json formatted string.
102
-	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
103
-	 */
104
-	public static function success( $data = array() ) {
105
-		\OC_JSON::success($data);
106
-	}
94
+    /**
95
+     * Send json success msg
96
+     *
97
+     * Return a json success message with optional extra data.
98
+     * @see OCP\JSON::error()		for the format to use.
99
+     *
100
+     * @param array $data The data to use
101
+     * @return string json formatted string.
102
+     * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
103
+     */
104
+    public static function success( $data = array() ) {
105
+        \OC_JSON::success($data);
106
+    }
107 107
 
108
-	/**
109
-	 * Send json error msg
110
-	 *
111
-	 * Return a json error message with optional extra data for
112
-	 * error message or app specific data.
113
-	 *
114
-	 * Example use:
115
-	 *
116
-	 *     $id = [some value]
117
-	 *     OCP\JSON::error(array('data':array('message':'An error happened', 'id': $id)));
118
-	 *
119
-	 * Will return the json formatted string:
120
-	 *
121
-	 *     {"status":"error","data":{"message":"An error happened", "id":[some value]}}
122
-	 *
123
-	 * @param array $data The data to use
124
-	 * @return string json formatted error string.
125
-	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
126
-	 */
127
-	public static function error( $data = array() ) {
128
-		\OC_JSON::error( $data );
129
-	}
108
+    /**
109
+     * Send json error msg
110
+     *
111
+     * Return a json error message with optional extra data for
112
+     * error message or app specific data.
113
+     *
114
+     * Example use:
115
+     *
116
+     *     $id = [some value]
117
+     *     OCP\JSON::error(array('data':array('message':'An error happened', 'id': $id)));
118
+     *
119
+     * Will return the json formatted string:
120
+     *
121
+     *     {"status":"error","data":{"message":"An error happened", "id":[some value]}}
122
+     *
123
+     * @param array $data The data to use
124
+     * @return string json formatted error string.
125
+     * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
126
+     */
127
+    public static function error( $data = array() ) {
128
+        \OC_JSON::error( $data );
129
+    }
130 130
 
131
-	/**
132
-	 * Set Content-Type header to jsonrequest
133
-	 * @param string $type The content type header
134
-	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
135
-	 */
136
-	public static function setContentTypeHeader( $type='application/json' ) {
137
-		\OC_JSON::setContentTypeHeader($type);
138
-	}
131
+    /**
132
+     * Set Content-Type header to jsonrequest
133
+     * @param string $type The content type header
134
+     * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
135
+     */
136
+    public static function setContentTypeHeader( $type='application/json' ) {
137
+        \OC_JSON::setContentTypeHeader($type);
138
+    }
139 139
 
140
-	/**
141
-	 * Check if the App is enabled and send JSON error message instead
142
-	 *
143
-	 * This method checks if a specific app is enabled. If not, a json error
144
-	 * response will be return and the method will exit from execution
145
-	 * of the script.
146
-	 * The returned json will be in the format:
147
-	 *
148
-	 *     {"status":"error","data":{"message":"Application is not enabled."}}
149
-	 *
150
-	 * Add this call to the start of all ajax method files that requires
151
-	 * a specific app to be enabled.
152
-	 *
153
-	 * @param string $app The app to check
154
-	 * @deprecated 8.1.0 Use the AppFramework instead. It will automatically check if the app is enabled.
155
-	 */
156
-	public static function checkAppEnabled( $app ) {
157
-		\OC_JSON::checkAppEnabled($app);
158
-	}
140
+    /**
141
+     * Check if the App is enabled and send JSON error message instead
142
+     *
143
+     * This method checks if a specific app is enabled. If not, a json error
144
+     * response will be return and the method will exit from execution
145
+     * of the script.
146
+     * The returned json will be in the format:
147
+     *
148
+     *     {"status":"error","data":{"message":"Application is not enabled."}}
149
+     *
150
+     * Add this call to the start of all ajax method files that requires
151
+     * a specific app to be enabled.
152
+     *
153
+     * @param string $app The app to check
154
+     * @deprecated 8.1.0 Use the AppFramework instead. It will automatically check if the app is enabled.
155
+     */
156
+    public static function checkAppEnabled( $app ) {
157
+        \OC_JSON::checkAppEnabled($app);
158
+    }
159 159
 
160
-	/**
161
-	 * Check if the user is a admin, send json error msg if not
162
-	 *
163
-	 * This method checks if the current user has admin rights. If not, a json error
164
-	 * response will be return and the method will exit from execution
165
-	 * of the script.
166
-	 * The returned json will be in the format:
167
-	 *
168
-	 *     {"status":"error","data":{"message":"Authentication error."}}
169
-	 *
170
-	 * Add this call to the start of all ajax method files that requires
171
-	 * administrative rights.
172
-	 *
173
-	 * @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead
174
-	 */
175
-	public static function checkAdminUser() {
176
-		\OC_JSON::checkAdminUser();
177
-	}
160
+    /**
161
+     * Check if the user is a admin, send json error msg if not
162
+     *
163
+     * This method checks if the current user has admin rights. If not, a json error
164
+     * response will be return and the method will exit from execution
165
+     * of the script.
166
+     * The returned json will be in the format:
167
+     *
168
+     *     {"status":"error","data":{"message":"Authentication error."}}
169
+     *
170
+     * Add this call to the start of all ajax method files that requires
171
+     * administrative rights.
172
+     *
173
+     * @deprecated 8.1.0 Use annotation based ACLs from the AppFramework instead
174
+     */
175
+    public static function checkAdminUser() {
176
+        \OC_JSON::checkAdminUser();
177
+    }
178 178
 
179
-	/**
180
-	 * Encode JSON
181
-	 * @param array $data
182
-	 * @return string
183
-	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
184
-	 */
185
-	public static function encode($data) {
186
-		return \OC_JSON::encode($data);
187
-	}
179
+    /**
180
+     * Encode JSON
181
+     * @param array $data
182
+     * @return string
183
+     * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
184
+     */
185
+    public static function encode($data) {
186
+        return \OC_JSON::encode($data);
187
+    }
188 188
 
189
-	/**
190
-	 * Check is a given user exists - send json error msg if not
191
-	 * @param string $user
192
-	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
193
-	 */
194
-	public static function checkUserExists($user) {
195
-		\OC_JSON::checkUserExists($user);
196
-	}
189
+    /**
190
+     * Check is a given user exists - send json error msg if not
191
+     * @param string $user
192
+     * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
193
+     */
194
+    public static function checkUserExists($user) {
195
+        \OC_JSON::checkUserExists($user);
196
+    }
197 197
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 * @param bool $setContentType the optional content type
47 47
 	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
48 48
 	 */
49
-	public static function encodedPrint( $data, $setContentType=true ) {
49
+	public static function encodedPrint($data, $setContentType = true) {
50 50
 		\OC_JSON::encodedPrint($data, $setContentType);
51 51
 	}
52 52
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 * @return string json formatted string.
102 102
 	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
103 103
 	 */
104
-	public static function success( $data = array() ) {
104
+	public static function success($data = array()) {
105 105
 		\OC_JSON::success($data);
106 106
 	}
107 107
 
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
 	 * @return string json formatted error string.
125 125
 	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
126 126
 	 */
127
-	public static function error( $data = array() ) {
128
-		\OC_JSON::error( $data );
127
+	public static function error($data = array()) {
128
+		\OC_JSON::error($data);
129 129
 	}
130 130
 
131 131
 	/**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string $type The content type header
134 134
 	 * @deprecated 8.1.0 Use a AppFramework JSONResponse instead
135 135
 	 */
136
-	public static function setContentTypeHeader( $type='application/json' ) {
136
+	public static function setContentTypeHeader($type = 'application/json') {
137 137
 		\OC_JSON::setContentTypeHeader($type);
138 138
 	}
139 139
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * @param string $app The app to check
154 154
 	 * @deprecated 8.1.0 Use the AppFramework instead. It will automatically check if the app is enabled.
155 155
 	 */
156
-	public static function checkAppEnabled( $app ) {
156
+	public static function checkAppEnabled($app) {
157 157
 		\OC_JSON::checkAppEnabled($app);
158 158
 	}
159 159
 
Please login to merge, or discard this patch.
lib/public/console/consoleevent.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -32,39 +32,39 @@
 block discarded – undo
32 32
  */
33 33
 class ConsoleEvent extends Event {
34 34
 
35
-	const EVENT_RUN = 'OC\Console\Application::run';
35
+    const EVENT_RUN = 'OC\Console\Application::run';
36 36
 
37
-	/** @var string */
38
-	protected $event;
37
+    /** @var string */
38
+    protected $event;
39 39
 
40
-	/** @var string[] */
41
-	protected $arguments;
40
+    /** @var string[] */
41
+    protected $arguments;
42 42
 
43
-	/**
44
-	 * DispatcherEvent constructor.
45
-	 *
46
-	 * @param string $event
47
-	 * @param string[] $arguments
48
-	 * @since 9.0.0
49
-	 */
50
-	public function __construct($event, array $arguments) {
51
-		$this->event = $event;
52
-		$this->arguments = $arguments;
53
-	}
43
+    /**
44
+     * DispatcherEvent constructor.
45
+     *
46
+     * @param string $event
47
+     * @param string[] $arguments
48
+     * @since 9.0.0
49
+     */
50
+    public function __construct($event, array $arguments) {
51
+        $this->event = $event;
52
+        $this->arguments = $arguments;
53
+    }
54 54
 
55
-	/**
56
-	 * @return string
57
-	 * @since 9.0.0
58
-	 */
59
-	public function getEvent() {
60
-		return $this->event;
61
-	}
55
+    /**
56
+     * @return string
57
+     * @since 9.0.0
58
+     */
59
+    public function getEvent() {
60
+        return $this->event;
61
+    }
62 62
 
63
-	/**
64
-	 * @return string[]
65
-	 * @since 9.0.0
66
-	 */
67
-	public function getArguments() {
68
-		return $this->arguments;
69
-	}
63
+    /**
64
+     * @return string[]
65
+     * @since 9.0.0
66
+     */
67
+    public function getArguments() {
68
+        return $this->arguments;
69
+    }
70 70
 }
Please login to merge, or discard this patch.
lib/public/iusermanager.php 2 patches
Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -41,106 +41,106 @@
 block discarded – undo
41 41
  * @since 8.0.0
42 42
  */
43 43
 interface IUserManager {
44
-		/**
45
-	 * register a user backend
46
-	 *
47
-	 * @param \OCP\UserInterface $backend
48
-	 * @since 8.0.0
49
-	 */
50
-	public function registerBackend($backend);
44
+        /**
45
+         * register a user backend
46
+         *
47
+         * @param \OCP\UserInterface $backend
48
+         * @since 8.0.0
49
+         */
50
+    public function registerBackend($backend);
51 51
 
52
-	/**
53
-	 * Get the active backends
54
-	 * @return \OCP\UserInterface[]
55
-	 * @since 8.0.0
56
-	 */
57
-	public function getBackends();
52
+    /**
53
+     * Get the active backends
54
+     * @return \OCP\UserInterface[]
55
+     * @since 8.0.0
56
+     */
57
+    public function getBackends();
58 58
 
59
-	/**
60
-	 * remove a user backend
61
-	 *
62
-	 * @param \OCP\UserInterface $backend
63
-	 * @since 8.0.0
64
-	 */
65
-	public function removeBackend($backend);
59
+    /**
60
+     * remove a user backend
61
+     *
62
+     * @param \OCP\UserInterface $backend
63
+     * @since 8.0.0
64
+     */
65
+    public function removeBackend($backend);
66 66
 
67
-	/**
68
-	 * remove all user backends
69
-	 * @since 8.0.0
70
-	 */
71
-	public function clearBackends() ;
67
+    /**
68
+     * remove all user backends
69
+     * @since 8.0.0
70
+     */
71
+    public function clearBackends() ;
72 72
 
73
-	/**
74
-	 * get a user by user id
75
-	 *
76
-	 * @param string $uid
77
-	 * @return \OCP\IUser|null Either the user or null if the specified user does not exist
78
-	 * @since 8.0.0
79
-	 */
80
-	public function get($uid);
73
+    /**
74
+     * get a user by user id
75
+     *
76
+     * @param string $uid
77
+     * @return \OCP\IUser|null Either the user or null if the specified user does not exist
78
+     * @since 8.0.0
79
+     */
80
+    public function get($uid);
81 81
 
82
-	/**
83
-	 * check if a user exists
84
-	 *
85
-	 * @param string $uid
86
-	 * @return bool
87
-	 * @since 8.0.0
88
-	 */
89
-	public function userExists($uid);
82
+    /**
83
+     * check if a user exists
84
+     *
85
+     * @param string $uid
86
+     * @return bool
87
+     * @since 8.0.0
88
+     */
89
+    public function userExists($uid);
90 90
 
91
-	/**
92
-	 * Check if the password is valid for the user
93
-	 *
94
-	 * @param string $loginName
95
-	 * @param string $password
96
-	 * @return mixed the User object on success, false otherwise
97
-	 * @since 8.0.0
98
-	 */
99
-	public function checkPassword($loginName, $password);
91
+    /**
92
+     * Check if the password is valid for the user
93
+     *
94
+     * @param string $loginName
95
+     * @param string $password
96
+     * @return mixed the User object on success, false otherwise
97
+     * @since 8.0.0
98
+     */
99
+    public function checkPassword($loginName, $password);
100 100
 
101
-	/**
102
-	 * search by user id
103
-	 *
104
-	 * @param string $pattern
105
-	 * @param int $limit
106
-	 * @param int $offset
107
-	 * @return \OCP\IUser[]
108
-	 * @since 8.0.0
109
-	 */
110
-	public function search($pattern, $limit = null, $offset = null);
101
+    /**
102
+     * search by user id
103
+     *
104
+     * @param string $pattern
105
+     * @param int $limit
106
+     * @param int $offset
107
+     * @return \OCP\IUser[]
108
+     * @since 8.0.0
109
+     */
110
+    public function search($pattern, $limit = null, $offset = null);
111 111
 
112
-	/**
113
-	 * search by displayName
114
-	 *
115
-	 * @param string $pattern
116
-	 * @param int $limit
117
-	 * @param int $offset
118
-	 * @return \OCP\IUser[]
119
-	 * @since 8.0.0
120
-	 */
121
-	public function searchDisplayName($pattern, $limit = null, $offset = null);
112
+    /**
113
+     * search by displayName
114
+     *
115
+     * @param string $pattern
116
+     * @param int $limit
117
+     * @param int $offset
118
+     * @return \OCP\IUser[]
119
+     * @since 8.0.0
120
+     */
121
+    public function searchDisplayName($pattern, $limit = null, $offset = null);
122 122
 
123
-	/**
124
-	 * @param string $uid
125
-	 * @param string $password
126
-	 * @throws \Exception
127
-	 * @return bool|\OCP\IUser the created user of false
128
-	 * @since 8.0.0
129
-	 */
130
-	public function createUser($uid, $password);
123
+    /**
124
+     * @param string $uid
125
+     * @param string $password
126
+     * @throws \Exception
127
+     * @return bool|\OCP\IUser the created user of false
128
+     * @since 8.0.0
129
+     */
130
+    public function createUser($uid, $password);
131 131
 
132
-	/**
133
-	 * returns how many users per backend exist (if supported by backend)
134
-	 *
135
-	 * @return array an array of backend class as key and count number as value
136
-	 * @since 8.0.0
137
-	 */
138
-	public function countUsers();
132
+    /**
133
+     * returns how many users per backend exist (if supported by backend)
134
+     *
135
+     * @return array an array of backend class as key and count number as value
136
+     * @since 8.0.0
137
+     */
138
+    public function countUsers();
139 139
 
140
-	/**
141
-	 * @param \Closure $callback
142
-	 * @param string $search
143
-	 * @since 9.0.0
144
-	 */
145
-	public function callForAllUsers (\Closure $callback, $search = '');
140
+    /**
141
+     * @param \Closure $callback
142
+     * @param string $search
143
+     * @since 9.0.0
144
+     */
145
+    public function callForAllUsers (\Closure $callback, $search = '');
146 146
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * remove all user backends
69 69
 	 * @since 8.0.0
70 70
 	 */
71
-	public function clearBackends() ;
71
+	public function clearBackends();
72 72
 
73 73
 	/**
74 74
 	 * get a user by user id
@@ -142,5 +142,5 @@  discard block
 block discarded – undo
142 142
 	 * @param string $search
143 143
 	 * @since 9.0.0
144 144
 	 */
145
-	public function callForAllUsers (\Closure $callback, $search = '');
145
+	public function callForAllUsers(\Closure $callback, $search = '');
146 146
 }
Please login to merge, or discard this patch.