@@ -29,19 +29,19 @@ |
||
29 | 29 | * @deprecated 23.0.0 |
30 | 30 | */ |
31 | 31 | interface IApiCollection { |
32 | - /** |
|
33 | - * @return IUserApi |
|
34 | - * |
|
35 | - * @since 13.0.0 |
|
36 | - * @deprecated 23.0.0 |
|
37 | - */ |
|
38 | - public function getUserApi(); |
|
32 | + /** |
|
33 | + * @return IUserApi |
|
34 | + * |
|
35 | + * @since 13.0.0 |
|
36 | + * @deprecated 23.0.0 |
|
37 | + */ |
|
38 | + public function getUserApi(); |
|
39 | 39 | |
40 | - /** |
|
41 | - * @return ICapabilitiesApi |
|
42 | - * |
|
43 | - * @since 13.0.0 |
|
44 | - * @deprecated 23.0.0 |
|
45 | - */ |
|
46 | - public function getCapabilitiesApi(); |
|
40 | + /** |
|
41 | + * @return ICapabilitiesApi |
|
42 | + * |
|
43 | + * @since 13.0.0 |
|
44 | + * @deprecated 23.0.0 |
|
45 | + */ |
|
46 | + public function getCapabilitiesApi(); |
|
47 | 47 | } |
@@ -31,75 +31,75 @@ |
||
31 | 31 | * @since 9.1 |
32 | 32 | */ |
33 | 33 | interface IOperation { |
34 | - /** |
|
35 | - * returns a translated name to be presented in the web interface |
|
36 | - * |
|
37 | - * Example: "Automated tagging" (en), "Aŭtomata etikedado" (eo) |
|
38 | - * |
|
39 | - * @since 18.0.0 |
|
40 | - */ |
|
41 | - public function getDisplayName(): string; |
|
34 | + /** |
|
35 | + * returns a translated name to be presented in the web interface |
|
36 | + * |
|
37 | + * Example: "Automated tagging" (en), "Aŭtomata etikedado" (eo) |
|
38 | + * |
|
39 | + * @since 18.0.0 |
|
40 | + */ |
|
41 | + public function getDisplayName(): string; |
|
42 | 42 | |
43 | - /** |
|
44 | - * returns a translated, descriptive text to be presented in the web interface. |
|
45 | - * |
|
46 | - * It should be short and precise. |
|
47 | - * |
|
48 | - * Example: "Tag based automatic deletion of files after a given time." (en) |
|
49 | - * |
|
50 | - * @since 18.0.0 |
|
51 | - */ |
|
52 | - public function getDescription(): string; |
|
43 | + /** |
|
44 | + * returns a translated, descriptive text to be presented in the web interface. |
|
45 | + * |
|
46 | + * It should be short and precise. |
|
47 | + * |
|
48 | + * Example: "Tag based automatic deletion of files after a given time." (en) |
|
49 | + * |
|
50 | + * @since 18.0.0 |
|
51 | + */ |
|
52 | + public function getDescription(): string; |
|
53 | 53 | |
54 | - /** |
|
55 | - * returns the URL to the icon of the operator for display in the web interface. |
|
56 | - * |
|
57 | - * Usually, the implementation would utilize the `imagePath()` method of the |
|
58 | - * `\OCP\IURLGenerator` instance and simply return its result. |
|
59 | - * |
|
60 | - * Example implementation: return $this->urlGenerator->imagePath('myApp', 'cat.svg'); |
|
61 | - * |
|
62 | - * @since 18.0.0 |
|
63 | - */ |
|
64 | - public function getIcon(): string; |
|
54 | + /** |
|
55 | + * returns the URL to the icon of the operator for display in the web interface. |
|
56 | + * |
|
57 | + * Usually, the implementation would utilize the `imagePath()` method of the |
|
58 | + * `\OCP\IURLGenerator` instance and simply return its result. |
|
59 | + * |
|
60 | + * Example implementation: return $this->urlGenerator->imagePath('myApp', 'cat.svg'); |
|
61 | + * |
|
62 | + * @since 18.0.0 |
|
63 | + */ |
|
64 | + public function getIcon(): string; |
|
65 | 65 | |
66 | - /** |
|
67 | - * returns whether the operation can be used in the requested scope. |
|
68 | - * |
|
69 | - * Scope IDs are defined as constants in OCP\WorkflowEngine\IManager. At |
|
70 | - * time of writing these are SCOPE_ADMIN and SCOPE_USER. |
|
71 | - * |
|
72 | - * For possibly unknown future scopes the recommended behaviour is: if |
|
73 | - * user scope is permitted, the default behaviour should return `true`, |
|
74 | - * otherwise `false`. |
|
75 | - * |
|
76 | - * @param int $scope |
|
77 | - * @psalm-param IManager::SCOPE_* $scope |
|
78 | - * |
|
79 | - * @since 18.0.0 |
|
80 | - */ |
|
81 | - public function isAvailableForScope(int $scope): bool; |
|
66 | + /** |
|
67 | + * returns whether the operation can be used in the requested scope. |
|
68 | + * |
|
69 | + * Scope IDs are defined as constants in OCP\WorkflowEngine\IManager. At |
|
70 | + * time of writing these are SCOPE_ADMIN and SCOPE_USER. |
|
71 | + * |
|
72 | + * For possibly unknown future scopes the recommended behaviour is: if |
|
73 | + * user scope is permitted, the default behaviour should return `true`, |
|
74 | + * otherwise `false`. |
|
75 | + * |
|
76 | + * @param int $scope |
|
77 | + * @psalm-param IManager::SCOPE_* $scope |
|
78 | + * |
|
79 | + * @since 18.0.0 |
|
80 | + */ |
|
81 | + public function isAvailableForScope(int $scope): bool; |
|
82 | 82 | |
83 | - /** |
|
84 | - * Validates whether a configured workflow rule is valid. If it is not, |
|
85 | - * an `\UnexpectedValueException` is supposed to be thrown. |
|
86 | - * |
|
87 | - * @throws \UnexpectedValueException |
|
88 | - * @since 9.1 |
|
89 | - */ |
|
90 | - public function validateOperation(string $name, array $checks, string $operation): void; |
|
83 | + /** |
|
84 | + * Validates whether a configured workflow rule is valid. If it is not, |
|
85 | + * an `\UnexpectedValueException` is supposed to be thrown. |
|
86 | + * |
|
87 | + * @throws \UnexpectedValueException |
|
88 | + * @since 9.1 |
|
89 | + */ |
|
90 | + public function validateOperation(string $name, array $checks, string $operation): void; |
|
91 | 91 | |
92 | - /** |
|
93 | - * Is being called by the workflow engine when an event was triggered that |
|
94 | - * is configured for this operation. An evaluation whether the event |
|
95 | - * qualifies for this operation to run has still to be done by the |
|
96 | - * implementor by calling the RuleMatchers getMatchingOperations method |
|
97 | - * and evaluating the results. |
|
98 | - * |
|
99 | - * If the implementor is an IComplexOperation, this method will not be |
|
100 | - * called automatically. It can be used or left as no-op by the implementor. |
|
101 | - * |
|
102 | - * @since 18.0.0 |
|
103 | - */ |
|
104 | - public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatcher): void; |
|
92 | + /** |
|
93 | + * Is being called by the workflow engine when an event was triggered that |
|
94 | + * is configured for this operation. An evaluation whether the event |
|
95 | + * qualifies for this operation to run has still to be done by the |
|
96 | + * implementor by calling the RuleMatchers getMatchingOperations method |
|
97 | + * and evaluating the results. |
|
98 | + * |
|
99 | + * If the implementor is an IComplexOperation, this method will not be |
|
100 | + * called automatically. It can be used or left as no-op by the implementor. |
|
101 | + * |
|
102 | + * @since 18.0.0 |
|
103 | + */ |
|
104 | + public function onEvent(string $eventName, Event $event, IRuleMatcher $ruleMatcher): void; |
|
105 | 105 | } |
@@ -31,26 +31,26 @@ |
||
31 | 31 | * @since 23.0.0 |
32 | 32 | */ |
33 | 33 | interface ITrustedDomainHelper { |
34 | - /** |
|
35 | - * Checks whether a given URL is considered as trusted from the list |
|
36 | - * of trusted domains in the server's config file. If no trusted domains |
|
37 | - * have been configured and the url is valid, returns true. |
|
38 | - * |
|
39 | - * @param string $url |
|
40 | - * @return bool |
|
41 | - * @since 23.0.0 |
|
42 | - */ |
|
43 | - public function isTrustedUrl(string $url): bool; |
|
34 | + /** |
|
35 | + * Checks whether a given URL is considered as trusted from the list |
|
36 | + * of trusted domains in the server's config file. If no trusted domains |
|
37 | + * have been configured and the url is valid, returns true. |
|
38 | + * |
|
39 | + * @param string $url |
|
40 | + * @return bool |
|
41 | + * @since 23.0.0 |
|
42 | + */ |
|
43 | + public function isTrustedUrl(string $url): bool; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Checks whether a given domain is considered as trusted from the list |
|
47 | - * of trusted domains in the server's config file. If no trusted domains |
|
48 | - * have been configured, returns true. |
|
49 | - * This is used to prevent Host Header Poisoning. |
|
50 | - * |
|
51 | - * @param string $domainWithPort |
|
52 | - * @return bool |
|
53 | - * @since 23.0.0 |
|
54 | - */ |
|
55 | - public function isTrustedDomain(string $domainWithPort): bool; |
|
45 | + /** |
|
46 | + * Checks whether a given domain is considered as trusted from the list |
|
47 | + * of trusted domains in the server's config file. If no trusted domains |
|
48 | + * have been configured, returns true. |
|
49 | + * This is used to prevent Host Header Poisoning. |
|
50 | + * |
|
51 | + * @param string $domainWithPort |
|
52 | + * @return bool |
|
53 | + * @since 23.0.0 |
|
54 | + */ |
|
55 | + public function isTrustedDomain(string $domainWithPort): bool; |
|
56 | 56 | } |
@@ -27,30 +27,30 @@ |
||
27 | 27 | * @since 9.0.0 |
28 | 28 | */ |
29 | 29 | interface IPropagator { |
30 | - /** |
|
31 | - * Mark the beginning of a propagation batch |
|
32 | - * |
|
33 | - * Note that not all cache setups support propagation in which case this will be a noop |
|
34 | - * |
|
35 | - * Batching for cache setups that do support it has to be explicit since the cache state is not fully consistent |
|
36 | - * before the batch is committed. |
|
37 | - * |
|
38 | - * @since 9.1.0 |
|
39 | - */ |
|
40 | - public function beginBatch(); |
|
30 | + /** |
|
31 | + * Mark the beginning of a propagation batch |
|
32 | + * |
|
33 | + * Note that not all cache setups support propagation in which case this will be a noop |
|
34 | + * |
|
35 | + * Batching for cache setups that do support it has to be explicit since the cache state is not fully consistent |
|
36 | + * before the batch is committed. |
|
37 | + * |
|
38 | + * @since 9.1.0 |
|
39 | + */ |
|
40 | + public function beginBatch(); |
|
41 | 41 | |
42 | - /** |
|
43 | - * Commit the active propagation batch |
|
44 | - * |
|
45 | - * @since 9.1.0 |
|
46 | - */ |
|
47 | - public function commitBatch(); |
|
42 | + /** |
|
43 | + * Commit the active propagation batch |
|
44 | + * |
|
45 | + * @since 9.1.0 |
|
46 | + */ |
|
47 | + public function commitBatch(); |
|
48 | 48 | |
49 | - /** |
|
50 | - * @param string $internalPath |
|
51 | - * @param int $time |
|
52 | - * @param int $sizeDifference |
|
53 | - * @since 9.0.0 |
|
54 | - */ |
|
55 | - public function propagateChange($internalPath, $time, $sizeDifference = 0); |
|
49 | + /** |
|
50 | + * @param string $internalPath |
|
51 | + * @param int $time |
|
52 | + * @param int $sizeDifference |
|
53 | + * @since 9.0.0 |
|
54 | + */ |
|
55 | + public function propagateChange($internalPath, $time, $sizeDifference = 0); |
|
56 | 56 | } |
@@ -26,22 +26,22 @@ |
||
26 | 26 | * @since 12.0.0 |
27 | 27 | */ |
28 | 28 | interface ISearchOperator { |
29 | - /** |
|
30 | - * Get a query builder hint by name |
|
31 | - * |
|
32 | - * @param string $name |
|
33 | - * @param $default |
|
34 | - * @return mixed |
|
35 | - * @since 23.0.0 |
|
36 | - */ |
|
37 | - public function getQueryHint(string $name, $default); |
|
29 | + /** |
|
30 | + * Get a query builder hint by name |
|
31 | + * |
|
32 | + * @param string $name |
|
33 | + * @param $default |
|
34 | + * @return mixed |
|
35 | + * @since 23.0.0 |
|
36 | + */ |
|
37 | + public function getQueryHint(string $name, $default); |
|
38 | 38 | |
39 | - /** |
|
40 | - * Get a query builder hint |
|
41 | - * |
|
42 | - * @param string $name |
|
43 | - * @param $value |
|
44 | - * @since 23.0.0 |
|
45 | - */ |
|
46 | - public function setQueryHint(string $name, $value): void; |
|
39 | + /** |
|
40 | + * Get a query builder hint |
|
41 | + * |
|
42 | + * @param string $name |
|
43 | + * @param $value |
|
44 | + * @since 23.0.0 |
|
45 | + */ |
|
46 | + public function setQueryHint(string $name, $value): void; |
|
47 | 47 | } |
@@ -43,147 +43,147 @@ |
||
43 | 43 | * @deprecated 22.0.0 use \OCP\EventDispatcher\Event |
44 | 44 | */ |
45 | 45 | class GenericEvent extends Event implements ArrayAccess, IteratorAggregate { |
46 | - /** @deprecated 22.0.0 */ |
|
47 | - protected $subject; |
|
48 | - |
|
49 | - /** @deprecated 22.0.0 */ |
|
50 | - protected $arguments; |
|
51 | - |
|
52 | - /** |
|
53 | - * Encapsulate an event with $subject and $args. |
|
54 | - * |
|
55 | - * @since 18.0.0 |
|
56 | - * @deprecated 22.0.0 |
|
57 | - */ |
|
58 | - public function __construct($subject = null, array $arguments = []) { |
|
59 | - parent::__construct(); |
|
60 | - $this->subject = $subject; |
|
61 | - $this->arguments = $arguments; |
|
62 | - } |
|
63 | - |
|
64 | - /** |
|
65 | - * Getter for subject property. |
|
66 | - * |
|
67 | - * @since 18.0.0 |
|
68 | - * @deprecated 22.0.0 |
|
69 | - */ |
|
70 | - public function getSubject() { |
|
71 | - return $this->subject; |
|
72 | - } |
|
73 | - |
|
74 | - /** |
|
75 | - * Get argument by key. |
|
76 | - * |
|
77 | - * @throws InvalidArgumentException if key is not found |
|
78 | - * @since 18.0.0 |
|
79 | - * @deprecated 22.0.0 |
|
80 | - */ |
|
81 | - public function getArgument(string $key) { |
|
82 | - if ($this->hasArgument($key)) { |
|
83 | - return $this->arguments[$key]; |
|
84 | - } |
|
85 | - |
|
86 | - throw new InvalidArgumentException(sprintf('Argument "%s" not found.', $key)); |
|
87 | - } |
|
88 | - |
|
89 | - /** |
|
90 | - * Add argument to event. |
|
91 | - * |
|
92 | - * @since 18.0.0 |
|
93 | - * @deprecated 22.0.0 |
|
94 | - */ |
|
95 | - public function setArgument($key, $value): GenericEvent { |
|
96 | - $this->arguments[$key] = $value; |
|
97 | - return $this; |
|
98 | - } |
|
99 | - |
|
100 | - /** |
|
101 | - * Getter for all arguments. |
|
102 | - * |
|
103 | - * @since 18.0.0 |
|
104 | - * @deprecated 22.0.0 |
|
105 | - */ |
|
106 | - public function getArguments(): array { |
|
107 | - return $this->arguments; |
|
108 | - } |
|
109 | - |
|
110 | - /** |
|
111 | - * Set args property. |
|
112 | - * |
|
113 | - * @since 18.0.0 |
|
114 | - * @deprecated 22.0.0 |
|
115 | - */ |
|
116 | - public function setArguments(array $args = []): GenericEvent { |
|
117 | - $this->arguments = $args; |
|
118 | - return $this; |
|
119 | - } |
|
120 | - |
|
121 | - /** |
|
122 | - * Has argument. |
|
123 | - * |
|
124 | - * @since 18.0.0 |
|
125 | - * @deprecated 22.0.0 |
|
126 | - */ |
|
127 | - public function hasArgument($key): bool { |
|
128 | - return array_key_exists($key, $this->arguments); |
|
129 | - } |
|
130 | - |
|
131 | - /** |
|
132 | - * Retrieve an external iterator |
|
133 | - * |
|
134 | - * @link https://php.net/manual/en/iteratoraggregate.getiterator.php |
|
135 | - * @since 18.0.0 |
|
136 | - * @deprecated 22.0.0 |
|
137 | - */ |
|
138 | - public function getIterator(): Traversable { |
|
139 | - return new ArrayIterator($this->arguments); |
|
140 | - } |
|
141 | - |
|
142 | - /** |
|
143 | - * Whether a offset exists |
|
144 | - * |
|
145 | - * @link https://php.net/manual/en/arrayaccess.offsetexists.php |
|
146 | - * @since 18.0.0 |
|
147 | - * @deprecated 22.0.0 |
|
148 | - */ |
|
149 | - public function offsetExists($offset): bool { |
|
150 | - return $this->hasArgument($offset); |
|
151 | - } |
|
152 | - |
|
153 | - /** |
|
154 | - * Offset to retrieve |
|
155 | - * |
|
156 | - * @link https://php.net/manual/en/arrayaccess.offsetget.php |
|
157 | - * @since 18.0.0 |
|
158 | - * @deprecated 22.0.0 |
|
159 | - * @return mixed |
|
160 | - */ |
|
161 | - #[\ReturnTypeWillChange] |
|
162 | - public function offsetGet($offset) { |
|
163 | - return $this->arguments[$offset]; |
|
164 | - } |
|
165 | - |
|
166 | - /** |
|
167 | - * Offset to set |
|
168 | - * |
|
169 | - * @link https://php.net/manual/en/arrayaccess.offsetset.php |
|
170 | - * @since 18.0.0 |
|
171 | - * @deprecated 22.0.0 |
|
172 | - */ |
|
173 | - public function offsetSet($offset, $value): void { |
|
174 | - $this->setArgument($offset, $value); |
|
175 | - } |
|
176 | - |
|
177 | - /** |
|
178 | - * Offset to unset |
|
179 | - * |
|
180 | - * @link https://php.net/manual/en/arrayaccess.offsetunset.php |
|
181 | - * @since 18.0.0 |
|
182 | - * @deprecated 22.0.0 |
|
183 | - */ |
|
184 | - public function offsetUnset($offset): void { |
|
185 | - if ($this->hasArgument($offset)) { |
|
186 | - unset($this->arguments[$offset]); |
|
187 | - } |
|
188 | - } |
|
46 | + /** @deprecated 22.0.0 */ |
|
47 | + protected $subject; |
|
48 | + |
|
49 | + /** @deprecated 22.0.0 */ |
|
50 | + protected $arguments; |
|
51 | + |
|
52 | + /** |
|
53 | + * Encapsulate an event with $subject and $args. |
|
54 | + * |
|
55 | + * @since 18.0.0 |
|
56 | + * @deprecated 22.0.0 |
|
57 | + */ |
|
58 | + public function __construct($subject = null, array $arguments = []) { |
|
59 | + parent::__construct(); |
|
60 | + $this->subject = $subject; |
|
61 | + $this->arguments = $arguments; |
|
62 | + } |
|
63 | + |
|
64 | + /** |
|
65 | + * Getter for subject property. |
|
66 | + * |
|
67 | + * @since 18.0.0 |
|
68 | + * @deprecated 22.0.0 |
|
69 | + */ |
|
70 | + public function getSubject() { |
|
71 | + return $this->subject; |
|
72 | + } |
|
73 | + |
|
74 | + /** |
|
75 | + * Get argument by key. |
|
76 | + * |
|
77 | + * @throws InvalidArgumentException if key is not found |
|
78 | + * @since 18.0.0 |
|
79 | + * @deprecated 22.0.0 |
|
80 | + */ |
|
81 | + public function getArgument(string $key) { |
|
82 | + if ($this->hasArgument($key)) { |
|
83 | + return $this->arguments[$key]; |
|
84 | + } |
|
85 | + |
|
86 | + throw new InvalidArgumentException(sprintf('Argument "%s" not found.', $key)); |
|
87 | + } |
|
88 | + |
|
89 | + /** |
|
90 | + * Add argument to event. |
|
91 | + * |
|
92 | + * @since 18.0.0 |
|
93 | + * @deprecated 22.0.0 |
|
94 | + */ |
|
95 | + public function setArgument($key, $value): GenericEvent { |
|
96 | + $this->arguments[$key] = $value; |
|
97 | + return $this; |
|
98 | + } |
|
99 | + |
|
100 | + /** |
|
101 | + * Getter for all arguments. |
|
102 | + * |
|
103 | + * @since 18.0.0 |
|
104 | + * @deprecated 22.0.0 |
|
105 | + */ |
|
106 | + public function getArguments(): array { |
|
107 | + return $this->arguments; |
|
108 | + } |
|
109 | + |
|
110 | + /** |
|
111 | + * Set args property. |
|
112 | + * |
|
113 | + * @since 18.0.0 |
|
114 | + * @deprecated 22.0.0 |
|
115 | + */ |
|
116 | + public function setArguments(array $args = []): GenericEvent { |
|
117 | + $this->arguments = $args; |
|
118 | + return $this; |
|
119 | + } |
|
120 | + |
|
121 | + /** |
|
122 | + * Has argument. |
|
123 | + * |
|
124 | + * @since 18.0.0 |
|
125 | + * @deprecated 22.0.0 |
|
126 | + */ |
|
127 | + public function hasArgument($key): bool { |
|
128 | + return array_key_exists($key, $this->arguments); |
|
129 | + } |
|
130 | + |
|
131 | + /** |
|
132 | + * Retrieve an external iterator |
|
133 | + * |
|
134 | + * @link https://php.net/manual/en/iteratoraggregate.getiterator.php |
|
135 | + * @since 18.0.0 |
|
136 | + * @deprecated 22.0.0 |
|
137 | + */ |
|
138 | + public function getIterator(): Traversable { |
|
139 | + return new ArrayIterator($this->arguments); |
|
140 | + } |
|
141 | + |
|
142 | + /** |
|
143 | + * Whether a offset exists |
|
144 | + * |
|
145 | + * @link https://php.net/manual/en/arrayaccess.offsetexists.php |
|
146 | + * @since 18.0.0 |
|
147 | + * @deprecated 22.0.0 |
|
148 | + */ |
|
149 | + public function offsetExists($offset): bool { |
|
150 | + return $this->hasArgument($offset); |
|
151 | + } |
|
152 | + |
|
153 | + /** |
|
154 | + * Offset to retrieve |
|
155 | + * |
|
156 | + * @link https://php.net/manual/en/arrayaccess.offsetget.php |
|
157 | + * @since 18.0.0 |
|
158 | + * @deprecated 22.0.0 |
|
159 | + * @return mixed |
|
160 | + */ |
|
161 | + #[\ReturnTypeWillChange] |
|
162 | + public function offsetGet($offset) { |
|
163 | + return $this->arguments[$offset]; |
|
164 | + } |
|
165 | + |
|
166 | + /** |
|
167 | + * Offset to set |
|
168 | + * |
|
169 | + * @link https://php.net/manual/en/arrayaccess.offsetset.php |
|
170 | + * @since 18.0.0 |
|
171 | + * @deprecated 22.0.0 |
|
172 | + */ |
|
173 | + public function offsetSet($offset, $value): void { |
|
174 | + $this->setArgument($offset, $value); |
|
175 | + } |
|
176 | + |
|
177 | + /** |
|
178 | + * Offset to unset |
|
179 | + * |
|
180 | + * @link https://php.net/manual/en/arrayaccess.offsetunset.php |
|
181 | + * @since 18.0.0 |
|
182 | + * @deprecated 22.0.0 |
|
183 | + */ |
|
184 | + public function offsetUnset($offset): void { |
|
185 | + if ($this->hasArgument($offset)) { |
|
186 | + unset($this->arguments[$offset]); |
|
187 | + } |
|
188 | + } |
|
189 | 189 | } |
@@ -28,27 +28,27 @@ |
||
28 | 28 | * @since 23.0.0 |
29 | 29 | */ |
30 | 30 | interface IDelegatedSettings extends ISettings { |
31 | - /** |
|
32 | - * Get the name of the settings to differentiate settings inside a section or |
|
33 | - * null if only the section name should be displayed. |
|
34 | - * @since 23.0.0 |
|
35 | - */ |
|
36 | - public function getName(): ?string; |
|
31 | + /** |
|
32 | + * Get the name of the settings to differentiate settings inside a section or |
|
33 | + * null if only the section name should be displayed. |
|
34 | + * @since 23.0.0 |
|
35 | + */ |
|
36 | + public function getName(): ?string; |
|
37 | 37 | |
38 | - /** |
|
39 | - * Get a list of authorized app config that this setting is allowed to modify. |
|
40 | - * The format of the array is the following: |
|
41 | - * ```php |
|
42 | - * <?php |
|
43 | - * [ |
|
44 | - * 'app_name' => [ |
|
45 | - * '/simple_key/', # value |
|
46 | - * '/s[a-z]*ldap/', # regex |
|
47 | - * ], |
|
48 | - * 'another_app_name => [ ... ], |
|
49 | - * ] |
|
50 | - * ``` |
|
51 | - * @since 23.0.0 |
|
52 | - */ |
|
53 | - public function getAuthorizedAppConfig(): array; |
|
38 | + /** |
|
39 | + * Get a list of authorized app config that this setting is allowed to modify. |
|
40 | + * The format of the array is the following: |
|
41 | + * ```php |
|
42 | + * <?php |
|
43 | + * [ |
|
44 | + * 'app_name' => [ |
|
45 | + * '/simple_key/', # value |
|
46 | + * '/s[a-z]*ldap/', # regex |
|
47 | + * ], |
|
48 | + * 'another_app_name => [ ... ], |
|
49 | + * ] |
|
50 | + * ``` |
|
51 | + * @since 23.0.0 |
|
52 | + */ |
|
53 | + public function getAuthorizedAppConfig(): array; |
|
54 | 54 | } |
@@ -28,23 +28,23 @@ |
||
28 | 28 | use OCP\DB\QueryBuilder\IQueryFunction; |
29 | 29 | |
30 | 30 | class PgSqlFunctionBuilder extends FunctionBuilder { |
31 | - public function concat($x, ...$expr): IQueryFunction { |
|
32 | - $args = func_get_args(); |
|
33 | - $list = []; |
|
34 | - foreach ($args as $item) { |
|
35 | - $list[] = $this->queryBuilder->expr()->castColumn($item, IQueryBuilder::PARAM_STR); |
|
36 | - } |
|
37 | - return new QueryFunction(sprintf('(%s)', implode(' || ', $list))); |
|
38 | - } |
|
31 | + public function concat($x, ...$expr): IQueryFunction { |
|
32 | + $args = func_get_args(); |
|
33 | + $list = []; |
|
34 | + foreach ($args as $item) { |
|
35 | + $list[] = $this->queryBuilder->expr()->castColumn($item, IQueryBuilder::PARAM_STR); |
|
36 | + } |
|
37 | + return new QueryFunction(sprintf('(%s)', implode(' || ', $list))); |
|
38 | + } |
|
39 | 39 | |
40 | - public function groupConcat($expr, ?string $separator = ','): IQueryFunction { |
|
41 | - $castedExpression = $this->queryBuilder->expr()->castColumn($expr, IQueryBuilder::PARAM_STR); |
|
40 | + public function groupConcat($expr, ?string $separator = ','): IQueryFunction { |
|
41 | + $castedExpression = $this->queryBuilder->expr()->castColumn($expr, IQueryBuilder::PARAM_STR); |
|
42 | 42 | |
43 | - if (is_null($separator)) { |
|
44 | - return new QueryFunction('string_agg(' . $castedExpression . ')'); |
|
45 | - } |
|
43 | + if (is_null($separator)) { |
|
44 | + return new QueryFunction('string_agg(' . $castedExpression . ')'); |
|
45 | + } |
|
46 | 46 | |
47 | - $separator = $this->connection->quote($separator); |
|
48 | - return new QueryFunction('string_agg(' . $castedExpression . ', ' . $separator . ')'); |
|
49 | - } |
|
47 | + $separator = $this->connection->quote($separator); |
|
48 | + return new QueryFunction('string_agg(' . $castedExpression . ', ' . $separator . ')'); |
|
49 | + } |
|
50 | 50 | } |
@@ -24,74 +24,74 @@ |
||
24 | 24 | namespace OC; |
25 | 25 | |
26 | 26 | class AppScriptDependency { |
27 | - /** @var string */ |
|
28 | - private $id; |
|
27 | + /** @var string */ |
|
28 | + private $id; |
|
29 | 29 | |
30 | - /** @var array */ |
|
31 | - private $deps; |
|
30 | + /** @var array */ |
|
31 | + private $deps; |
|
32 | 32 | |
33 | - /** @var bool */ |
|
34 | - private $visited; |
|
33 | + /** @var bool */ |
|
34 | + private $visited; |
|
35 | 35 | |
36 | - /** |
|
37 | - * @param string $id |
|
38 | - * @param array $deps |
|
39 | - * @param bool $visited |
|
40 | - */ |
|
41 | - public function __construct(string $id, array $deps = [], bool $visited = false) { |
|
42 | - $this->setId($id); |
|
43 | - $this->setDeps($deps); |
|
44 | - $this->setVisited($visited); |
|
45 | - } |
|
36 | + /** |
|
37 | + * @param string $id |
|
38 | + * @param array $deps |
|
39 | + * @param bool $visited |
|
40 | + */ |
|
41 | + public function __construct(string $id, array $deps = [], bool $visited = false) { |
|
42 | + $this->setId($id); |
|
43 | + $this->setDeps($deps); |
|
44 | + $this->setVisited($visited); |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return string |
|
49 | - */ |
|
50 | - public function getId(): string { |
|
51 | - return $this->id; |
|
52 | - } |
|
47 | + /** |
|
48 | + * @return string |
|
49 | + */ |
|
50 | + public function getId(): string { |
|
51 | + return $this->id; |
|
52 | + } |
|
53 | 53 | |
54 | - /** |
|
55 | - * @param string $id |
|
56 | - */ |
|
57 | - public function setId(string $id): void { |
|
58 | - $this->id = $id; |
|
59 | - } |
|
54 | + /** |
|
55 | + * @param string $id |
|
56 | + */ |
|
57 | + public function setId(string $id): void { |
|
58 | + $this->id = $id; |
|
59 | + } |
|
60 | 60 | |
61 | - /** |
|
62 | - * @return array |
|
63 | - */ |
|
64 | - public function getDeps(): array { |
|
65 | - return $this->deps; |
|
66 | - } |
|
61 | + /** |
|
62 | + * @return array |
|
63 | + */ |
|
64 | + public function getDeps(): array { |
|
65 | + return $this->deps; |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * @param array $deps |
|
70 | - */ |
|
71 | - public function setDeps(array $deps): void { |
|
72 | - $this->deps = $deps; |
|
73 | - } |
|
68 | + /** |
|
69 | + * @param array $deps |
|
70 | + */ |
|
71 | + public function setDeps(array $deps): void { |
|
72 | + $this->deps = $deps; |
|
73 | + } |
|
74 | 74 | |
75 | - /** |
|
76 | - * @param string $dep |
|
77 | - */ |
|
78 | - public function addDep(string $dep): void { |
|
79 | - if (!in_array($dep, $this->deps, true)) { |
|
80 | - $this->deps[] = $dep; |
|
81 | - } |
|
82 | - } |
|
75 | + /** |
|
76 | + * @param string $dep |
|
77 | + */ |
|
78 | + public function addDep(string $dep): void { |
|
79 | + if (!in_array($dep, $this->deps, true)) { |
|
80 | + $this->deps[] = $dep; |
|
81 | + } |
|
82 | + } |
|
83 | 83 | |
84 | - /** |
|
85 | - * @return bool |
|
86 | - */ |
|
87 | - public function isVisited(): bool { |
|
88 | - return $this->visited; |
|
89 | - } |
|
84 | + /** |
|
85 | + * @return bool |
|
86 | + */ |
|
87 | + public function isVisited(): bool { |
|
88 | + return $this->visited; |
|
89 | + } |
|
90 | 90 | |
91 | - /** |
|
92 | - * @param bool $visited |
|
93 | - */ |
|
94 | - public function setVisited(bool $visited): void { |
|
95 | - $this->visited = $visited; |
|
96 | - } |
|
91 | + /** |
|
92 | + * @param bool $visited |
|
93 | + */ |
|
94 | + public function setVisited(bool $visited): void { |
|
95 | + $this->visited = $visited; |
|
96 | + } |
|
97 | 97 | } |