Passed
Push — master ( 1e67a8...733c0f )
by Morris
13:19 queued 12s
created
lib/public/Activity/IManager.php 1 patch
Indentation   +139 added lines, -139 removed lines patch added patch discarded remove patch
@@ -35,143 +35,143 @@
 block discarded – undo
35 35
  * @since 6.0.0
36 36
  */
37 37
 interface IManager {
38
-	/**
39
-	 * Generates a new IEvent object
40
-	 *
41
-	 * Make sure to call at least the following methods before sending it to the
42
-	 * app with via the publish() method:
43
-	 *  - setApp()
44
-	 *  - setType()
45
-	 *  - setAffectedUser()
46
-	 *  - setSubject()
47
-	 *  - setObject()
48
-	 *
49
-	 * @return IEvent
50
-	 * @since 8.2.0
51
-	 */
52
-	public function generateEvent(): IEvent;
53
-
54
-	/**
55
-	 * Publish an event to the activity consumers
56
-	 *
57
-	 * Make sure to call at least the following methods before sending an Event:
58
-	 *  - setApp()
59
-	 *  - setType()
60
-	 *  - setAffectedUser()
61
-	 *  - setSubject()
62
-	 *  - setObject()
63
-	 *
64
-	 * @param IEvent $event
65
-	 * @throws \BadMethodCallException if required values have not been set
66
-	 * @since 8.2.0
67
-	 */
68
-	public function publish(IEvent $event): void;
69
-
70
-	/**
71
-	 * In order to improve lazy loading a closure can be registered which will be called in case
72
-	 * activity consumers are actually requested
73
-	 *
74
-	 * $callable has to return an instance of \OCP\Activity\IConsumer
75
-	 *
76
-	 * @param \Closure $callable
77
-	 * @since 6.0.0
78
-	 */
79
-	public function registerConsumer(\Closure $callable): void;
80
-
81
-	/**
82
-	 * @param string $filter Class must implement OCA\Activity\IFilter
83
-	 * @since 11.0.0
84
-	 */
85
-	public function registerFilter(string $filter): void;
86
-
87
-	/**
88
-	 * @return IFilter[]
89
-	 * @since 11.0.0
90
-	 */
91
-	public function getFilters(): array;
92
-
93
-	/**
94
-	 * @param string $id
95
-	 * @return IFilter
96
-	 * @throws \InvalidArgumentException when the filter was not found
97
-	 * @since 11.0.0
98
-	 */
99
-	public function getFilterById(string $id): IFilter;
100
-
101
-	/**
102
-	 * @param string $setting Class must implement OCA\Activity\ISetting
103
-	 * @since 11.0.0
104
-	 */
105
-	public function registerSetting(string $setting): void;
106
-
107
-	/**
108
-	 * @return ActivitySettings[]
109
-	 * @since 11.0.0
110
-	 */
111
-	public function getSettings(): array;
112
-
113
-	/**
114
-	 * @param string $provider Class must implement OCA\Activity\IProvider
115
-	 * @since 11.0.0
116
-	 */
117
-	public function registerProvider(string $provider): void;
118
-
119
-	/**
120
-	 * @return IProvider[]
121
-	 * @since 11.0.0
122
-	 */
123
-	public function getProviders(): array;
124
-
125
-	/**
126
-	 * @param string $id
127
-	 * @return ActivitySettings
128
-	 * @throws \InvalidArgumentException when the setting was not found
129
-	 * @since 11.0.0
130
-	 */
131
-	public function getSettingById(string $id): ActivitySettings;
132
-
133
-	/**
134
-	 * @param string $type
135
-	 * @param int $id
136
-	 * @since 8.2.0
137
-	 */
138
-	public function setFormattingObject(string $type, int $id): void;
139
-
140
-	/**
141
-	 * @return bool
142
-	 * @since 8.2.0
143
-	 */
144
-	public function isFormattingFilteredObject(): bool;
145
-
146
-	/**
147
-	 * @param bool $status Set to true, when parsing events should not use SVG icons
148
-	 * @since 12.0.1
149
-	 */
150
-	public function setRequirePNG(bool $status): void;
151
-
152
-	/**
153
-	 * @return bool
154
-	 * @since 12.0.1
155
-	 */
156
-	public function getRequirePNG(): bool;
157
-
158
-	/**
159
-	 * Set the user we need to use
160
-	 *
161
-	 * @param string|null $currentUserId
162
-	 * @throws \UnexpectedValueException If the user is invalid
163
-	 * @since 9.0.1
164
-	 */
165
-	public function setCurrentUserId(string $currentUserId = null): void;
166
-
167
-	/**
168
-	 * Get the user we need to use
169
-	 *
170
-	 * Either the user is logged in, or we try to get it from the token
171
-	 *
172
-	 * @return string
173
-	 * @throws \UnexpectedValueException If the token is invalid, does not exist or is not unique
174
-	 * @since 8.1.0
175
-	 */
176
-	public function getCurrentUserId(): string;
38
+    /**
39
+     * Generates a new IEvent object
40
+     *
41
+     * Make sure to call at least the following methods before sending it to the
42
+     * app with via the publish() method:
43
+     *  - setApp()
44
+     *  - setType()
45
+     *  - setAffectedUser()
46
+     *  - setSubject()
47
+     *  - setObject()
48
+     *
49
+     * @return IEvent
50
+     * @since 8.2.0
51
+     */
52
+    public function generateEvent(): IEvent;
53
+
54
+    /**
55
+     * Publish an event to the activity consumers
56
+     *
57
+     * Make sure to call at least the following methods before sending an Event:
58
+     *  - setApp()
59
+     *  - setType()
60
+     *  - setAffectedUser()
61
+     *  - setSubject()
62
+     *  - setObject()
63
+     *
64
+     * @param IEvent $event
65
+     * @throws \BadMethodCallException if required values have not been set
66
+     * @since 8.2.0
67
+     */
68
+    public function publish(IEvent $event): void;
69
+
70
+    /**
71
+     * In order to improve lazy loading a closure can be registered which will be called in case
72
+     * activity consumers are actually requested
73
+     *
74
+     * $callable has to return an instance of \OCP\Activity\IConsumer
75
+     *
76
+     * @param \Closure $callable
77
+     * @since 6.0.0
78
+     */
79
+    public function registerConsumer(\Closure $callable): void;
80
+
81
+    /**
82
+     * @param string $filter Class must implement OCA\Activity\IFilter
83
+     * @since 11.0.0
84
+     */
85
+    public function registerFilter(string $filter): void;
86
+
87
+    /**
88
+     * @return IFilter[]
89
+     * @since 11.0.0
90
+     */
91
+    public function getFilters(): array;
92
+
93
+    /**
94
+     * @param string $id
95
+     * @return IFilter
96
+     * @throws \InvalidArgumentException when the filter was not found
97
+     * @since 11.0.0
98
+     */
99
+    public function getFilterById(string $id): IFilter;
100
+
101
+    /**
102
+     * @param string $setting Class must implement OCA\Activity\ISetting
103
+     * @since 11.0.0
104
+     */
105
+    public function registerSetting(string $setting): void;
106
+
107
+    /**
108
+     * @return ActivitySettings[]
109
+     * @since 11.0.0
110
+     */
111
+    public function getSettings(): array;
112
+
113
+    /**
114
+     * @param string $provider Class must implement OCA\Activity\IProvider
115
+     * @since 11.0.0
116
+     */
117
+    public function registerProvider(string $provider): void;
118
+
119
+    /**
120
+     * @return IProvider[]
121
+     * @since 11.0.0
122
+     */
123
+    public function getProviders(): array;
124
+
125
+    /**
126
+     * @param string $id
127
+     * @return ActivitySettings
128
+     * @throws \InvalidArgumentException when the setting was not found
129
+     * @since 11.0.0
130
+     */
131
+    public function getSettingById(string $id): ActivitySettings;
132
+
133
+    /**
134
+     * @param string $type
135
+     * @param int $id
136
+     * @since 8.2.0
137
+     */
138
+    public function setFormattingObject(string $type, int $id): void;
139
+
140
+    /**
141
+     * @return bool
142
+     * @since 8.2.0
143
+     */
144
+    public function isFormattingFilteredObject(): bool;
145
+
146
+    /**
147
+     * @param bool $status Set to true, when parsing events should not use SVG icons
148
+     * @since 12.0.1
149
+     */
150
+    public function setRequirePNG(bool $status): void;
151
+
152
+    /**
153
+     * @return bool
154
+     * @since 12.0.1
155
+     */
156
+    public function getRequirePNG(): bool;
157
+
158
+    /**
159
+     * Set the user we need to use
160
+     *
161
+     * @param string|null $currentUserId
162
+     * @throws \UnexpectedValueException If the user is invalid
163
+     * @since 9.0.1
164
+     */
165
+    public function setCurrentUserId(string $currentUserId = null): void;
166
+
167
+    /**
168
+     * Get the user we need to use
169
+     *
170
+     * Either the user is logged in, or we try to get it from the token
171
+     *
172
+     * @return string
173
+     * @throws \UnexpectedValueException If the token is invalid, does not exist or is not unique
174
+     * @since 8.1.0
175
+     */
176
+    public function getCurrentUserId(): string;
177 177
 }
Please login to merge, or discard this patch.