@@ -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 | } |
@@ -29,16 +29,16 @@ |
||
29 | 29 | use OCP\Accounts\IAccountManager; |
30 | 30 | |
31 | 31 | trait TAccountsHelper { |
32 | - /** |
|
33 | - * returns whether the property is a collection |
|
34 | - */ |
|
35 | - protected function isCollection(string $propertyName): bool { |
|
36 | - return in_array( |
|
37 | - $propertyName, |
|
38 | - [ |
|
39 | - IAccountManager::COLLECTION_EMAIL, |
|
40 | - ], |
|
41 | - true |
|
42 | - ); |
|
43 | - } |
|
32 | + /** |
|
33 | + * returns whether the property is a collection |
|
34 | + */ |
|
35 | + protected function isCollection(string $propertyName): bool { |
|
36 | + return in_array( |
|
37 | + $propertyName, |
|
38 | + [ |
|
39 | + IAccountManager::COLLECTION_EMAIL, |
|
40 | + ], |
|
41 | + true |
|
42 | + ); |
|
43 | + } |
|
44 | 44 | } |
@@ -33,60 +33,60 @@ |
||
33 | 33 | use OCP\Files\SimpleFS\ISimpleFolder; |
34 | 34 | |
35 | 35 | class Root extends AppData { |
36 | - private $isMultibucketPreviewDistributionEnabled = false; |
|
37 | - public function __construct(IRootFolder $rootFolder, SystemConfig $systemConfig) { |
|
38 | - parent::__construct($rootFolder, $systemConfig, 'preview'); |
|
36 | + private $isMultibucketPreviewDistributionEnabled = false; |
|
37 | + public function __construct(IRootFolder $rootFolder, SystemConfig $systemConfig) { |
|
38 | + parent::__construct($rootFolder, $systemConfig, 'preview'); |
|
39 | 39 | |
40 | - $this->isMultibucketPreviewDistributionEnabled = $systemConfig->getValue('objectstore.multibucket.preview-distribution', false) === true; |
|
41 | - } |
|
40 | + $this->isMultibucketPreviewDistributionEnabled = $systemConfig->getValue('objectstore.multibucket.preview-distribution', false) === true; |
|
41 | + } |
|
42 | 42 | |
43 | 43 | |
44 | - public function getFolder(string $name): ISimpleFolder { |
|
45 | - $internalFolder = self::getInternalFolder($name); |
|
44 | + public function getFolder(string $name): ISimpleFolder { |
|
45 | + $internalFolder = self::getInternalFolder($name); |
|
46 | 46 | |
47 | - try { |
|
48 | - return parent::getFolder($internalFolder); |
|
49 | - } catch (NotFoundException $e) { |
|
50 | - /* |
|
47 | + try { |
|
48 | + return parent::getFolder($internalFolder); |
|
49 | + } catch (NotFoundException $e) { |
|
50 | + /* |
|
51 | 51 | * The new folder structure is not found. |
52 | 52 | * Lets try the old one |
53 | 53 | */ |
54 | - } |
|
54 | + } |
|
55 | 55 | |
56 | - try { |
|
57 | - return parent::getFolder($name); |
|
58 | - } catch (NotFoundException $e) { |
|
59 | - /* |
|
56 | + try { |
|
57 | + return parent::getFolder($name); |
|
58 | + } catch (NotFoundException $e) { |
|
59 | + /* |
|
60 | 60 | * The old folder structure is not found. |
61 | 61 | * Lets try the multibucket fallback if available |
62 | 62 | */ |
63 | - if ($this->isMultibucketPreviewDistributionEnabled) { |
|
64 | - return parent::getFolder('old-multibucket/' . $internalFolder); |
|
65 | - } |
|
63 | + if ($this->isMultibucketPreviewDistributionEnabled) { |
|
64 | + return parent::getFolder('old-multibucket/' . $internalFolder); |
|
65 | + } |
|
66 | 66 | |
67 | - // when there is no further fallback just throw the exception |
|
68 | - throw $e; |
|
69 | - } |
|
70 | - } |
|
67 | + // when there is no further fallback just throw the exception |
|
68 | + throw $e; |
|
69 | + } |
|
70 | + } |
|
71 | 71 | |
72 | - public function newFolder(string $name): ISimpleFolder { |
|
73 | - $internalFolder = self::getInternalFolder($name); |
|
74 | - return parent::newFolder($internalFolder); |
|
75 | - } |
|
72 | + public function newFolder(string $name): ISimpleFolder { |
|
73 | + $internalFolder = self::getInternalFolder($name); |
|
74 | + return parent::newFolder($internalFolder); |
|
75 | + } |
|
76 | 76 | |
77 | - /* |
|
77 | + /* |
|
78 | 78 | * Do not allow directory listing on this special root |
79 | 79 | * since it gets to big and time consuming |
80 | 80 | */ |
81 | - public function getDirectoryListing(): array { |
|
82 | - return []; |
|
83 | - } |
|
81 | + public function getDirectoryListing(): array { |
|
82 | + return []; |
|
83 | + } |
|
84 | 84 | |
85 | - public static function getInternalFolder(string $name): string { |
|
86 | - return implode('/', str_split(substr(md5($name), 0, 7))) . '/' . $name; |
|
87 | - } |
|
85 | + public static function getInternalFolder(string $name): string { |
|
86 | + return implode('/', str_split(substr(md5($name), 0, 7))) . '/' . $name; |
|
87 | + } |
|
88 | 88 | |
89 | - public function getStorageId(): int { |
|
90 | - return $this->getAppDataRootFolder()->getStorage()->getCache()->getNumericStorageId(); |
|
91 | - } |
|
89 | + public function getStorageId(): int { |
|
90 | + return $this->getAppDataRootFolder()->getStorage()->getCache()->getNumericStorageId(); |
|
91 | + } |
|
92 | 92 | } |
@@ -32,23 +32,23 @@ |
||
32 | 32 | use OCP\Migration\SimpleMigrationStep; |
33 | 33 | |
34 | 34 | class Version23000Date20211203110726 extends SimpleMigrationStep { |
35 | - private const TABLE_NAME = 'profile_config'; |
|
35 | + private const TABLE_NAME = 'profile_config'; |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param IOutput $output |
|
39 | - * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
40 | - * @param array $options |
|
41 | - * @return null|ISchemaWrapper |
|
42 | - */ |
|
43 | - public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
44 | - /** @var ISchemaWrapper $schema */ |
|
45 | - $schema = $schemaClosure(); |
|
37 | + /** |
|
38 | + * @param IOutput $output |
|
39 | + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` |
|
40 | + * @param array $options |
|
41 | + * @return null|ISchemaWrapper |
|
42 | + */ |
|
43 | + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { |
|
44 | + /** @var ISchemaWrapper $schema */ |
|
45 | + $schema = $schemaClosure(); |
|
46 | 46 | |
47 | - $table = $schema->getTable(self::TABLE_NAME); |
|
48 | - if ($table->hasIndex('user_id')) { |
|
49 | - $table->renameIndex('user_id', self::TABLE_NAME . '_user_id_idx'); |
|
50 | - return $schema; |
|
51 | - } |
|
52 | - return null; |
|
53 | - } |
|
47 | + $table = $schema->getTable(self::TABLE_NAME); |
|
48 | + if ($table->hasIndex('user_id')) { |
|
49 | + $table->renameIndex('user_id', self::TABLE_NAME . '_user_id_idx'); |
|
50 | + return $schema; |
|
51 | + } |
|
52 | + return null; |
|
53 | + } |
|
54 | 54 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * Defines the public facing principal option |
32 | 32 | */ |
33 | 33 | class PublicPrincipalPlugin extends Plugin { |
34 | - public function getCurrentPrincipal(): ?string { |
|
35 | - return 'principals/system/public'; |
|
36 | - } |
|
34 | + public function getCurrentPrincipal(): ?string { |
|
35 | + return 'principals/system/public'; |
|
36 | + } |
|
37 | 37 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * Set a custom principal uri to allow public requests to its calendar |
33 | 33 | */ |
34 | 34 | class CustomPrincipalPlugin extends Plugin { |
35 | - public function setCurrentPrincipal(?string $currentPrincipal): void { |
|
36 | - $this->currentPrincipal = $currentPrincipal; |
|
37 | - } |
|
35 | + public function setCurrentPrincipal(?string $currentPrincipal): void { |
|
36 | + $this->currentPrincipal = $currentPrincipal; |
|
37 | + } |
|
38 | 38 | } |