@@ -78,15 +78,15 @@ discard block |
||
78 | 78 | |
79 | 79 | $name = $rowCG['display_name']; |
80 | 80 | while (strlen($name) < 3) { |
81 | - $name = '_' . $name; |
|
81 | + $name = '_'.$name; |
|
82 | 82 | } |
83 | 83 | |
84 | - $this->output->writeln('+ New Team <info>' . $name . '</info>, owned by <info>' . $ownerId . '</info>'); |
|
84 | + $this->output->writeln('+ New Team <info>'.$name.'</info>, owned by <info>'.$ownerId.'</info>'); |
|
85 | 85 | |
86 | 86 | // based on owner's userid, we create federateduser and a new circle |
87 | 87 | $owner = $this->cachedFed($ownerId); |
88 | 88 | if ($owner === null) { |
89 | - $this->output->writeln('<error>unknown user</error> ' . $ownerId); |
|
89 | + $this->output->writeln('<error>unknown user</error> '.$ownerId); |
|
90 | 90 | continue; |
91 | 91 | } |
92 | 92 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | try { |
96 | 96 | $circle = $this->circlesManager->createCircle($name); |
97 | 97 | } catch (\Exception $e) { |
98 | - $this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error> with data ' . json_encode($rowCG)); |
|
98 | + $this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error> with data '.json_encode($rowCG)); |
|
99 | 99 | $this->logger->log(2, 'error while creating circle', ['exception' => $e]); |
100 | 100 | $this->circlesManager->stopSession(); |
101 | 101 | continue; |
@@ -124,17 +124,17 @@ discard block |
||
124 | 124 | |
125 | 125 | $fedUser = $this->cachedFed($userId); |
126 | 126 | if ($fedUser === null) { |
127 | - $this->output->writeln('<error>unknown user</error> ' . $userId); |
|
127 | + $this->output->writeln('<error>unknown user</error> '.$userId); |
|
128 | 128 | continue; |
129 | 129 | } |
130 | - $this->output->writeln(' - new member <info>' . $userId . '</info>'); |
|
130 | + $this->output->writeln(' - new member <info>'.$userId.'</info>'); |
|
131 | 131 | |
132 | 132 | $member = $this->circlesManager->addMember($circle->getSingleId(), $fedUser); |
133 | 133 | if ($rowM['role'] === '1') { |
134 | 134 | $this->circlesManager->levelMember($member->getId(), Member::LEVEL_ADMIN); |
135 | 135 | } |
136 | 136 | } catch (\Exception $e) { |
137 | - $this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error>'); |
|
137 | + $this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error>'); |
|
138 | 138 | $this->logger->log(2, 'error while migrating custom group member', ['exception' => $e]); |
139 | 139 | } |
140 | 140 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | ->where($update->expr()->in('id', $update->createNamedParameter($shareIds, IQueryBuilder::PARAM_INT_ARRAY))); |
171 | 171 | |
172 | 172 | $count = $update->executeStatement(); |
173 | - $this->output->writeln('> ' . ((string)$count) . ' shares updated'); |
|
173 | + $this->output->writeln('> '.((string)$count).' shares updated'); |
|
174 | 174 | |
175 | 175 | $this->fixShareChildren($shareIds, $memberIds); |
176 | 176 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | try { |
187 | 187 | $this->fedList[$userId] = $this->circlesManager->getLocalFederatedUser($userId); |
188 | 188 | } catch (\Exception $e) { |
189 | - $this->logger->warning('unknown local user ' . $userId, ['exception' => $e]); |
|
189 | + $this->logger->warning('unknown local user '.$userId, ['exception' => $e]); |
|
190 | 190 | $this->fedList[$userId] = null; |
191 | 191 | } |
192 | 192 | } |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $count += $update->executeStatement(); |
221 | 221 | } |
222 | 222 | |
223 | - $this->output->writeln('> ' . ((string)$count) . ' children shares updated'); |
|
223 | + $this->output->writeln('> '.((string)$count).' children shares updated'); |
|
224 | 224 | } |
225 | 225 | |
226 | 226 |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | '<error>WARNING! You are about to delete all data related to the Circles App!</error>' |
92 | 92 | ); |
93 | 93 | $question = new ConfirmationQuestion( |
94 | - '<comment>Do you really want to ' . $action . ' Circles ?</comment> (y/N) ', false, |
|
94 | + '<comment>Do you really want to '.$action.' Circles ?</comment> (y/N) ', false, |
|
95 | 95 | '/^(y|Y)/i' |
96 | 96 | ); |
97 | 97 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $output->writeln('<error>WARNING! This operation is not reversible.</error>'); |
108 | 108 | |
109 | 109 | $question = new Question( |
110 | - '<comment>Please confirm this destructive operation by typing \'' . $action |
|
110 | + '<comment>Please confirm this destructive operation by typing \''.$action |
|
111 | 111 | . '\'</comment>: ', '' |
112 | 112 | ); |
113 | 113 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $this->coreRequestBuilder->uninstall(); |
126 | 126 | } |
127 | 127 | |
128 | - $output->writeln('<info>' . $action . ' done</info>'); |
|
128 | + $output->writeln('<info>'.$action.' done</info>'); |
|
129 | 129 | |
130 | 130 | return 0; |
131 | 131 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $this->maintenanceService->runMaintenance($i, $input->getOption('force-refresh')); |
139 | 139 | } catch (MaintenanceException $e) { |
140 | 140 | $this->logger->warning('issue while performing maintenance', ['level' => $i, ['exception' => $e]]); |
141 | - $output->writeln('- <error>issue while performing maintenance</error> ' . $e->getMessage() . ' (more details in logs)'); |
|
141 | + $output->writeln('- <error>issue while performing maintenance</error> '.$e->getMessage().' (more details in logs)'); |
|
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $federatedUser = $this->federatedUserService->getLocalFederatedUser($userId); |
159 | 159 | $displayName = $this->maintenanceService->updateDisplayName($federatedUser); |
160 | 160 | if ($displayName !== '') { |
161 | - $output->writeln('Display name of ' . $federatedUser->getSingleId() . ' updated to ' . $displayName); |
|
161 | + $output->writeln('Display name of '.$federatedUser->getSingleId().' updated to '.$displayName); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | return 0; |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | try { |
174 | 174 | $this->refreshSingleDisplayName($row['uid'], $output); |
175 | 175 | } catch (Exception $e) { |
176 | - $output->writeln(get_class($e) . ' while trying to update display name of ' . $row['uid']); |
|
176 | + $output->writeln(get_class($e).' while trying to update display name of '.$row['uid']); |
|
177 | 177 | } |
178 | 178 | } |
179 | 179 | } |
@@ -40,276 +40,276 @@ |
||
40 | 40 | */ |
41 | 41 | class Schema extends AbstractAsset |
42 | 42 | { |
43 | - /** @var Table[] */ |
|
44 | - protected $_tables = []; |
|
43 | + /** @var Table[] */ |
|
44 | + protected $_tables = []; |
|
45 | 45 | |
46 | - /** @var Sequence[] */ |
|
47 | - protected $_sequences = []; |
|
46 | + /** @var Sequence[] */ |
|
47 | + protected $_sequences = []; |
|
48 | 48 | |
49 | - /** @var SchemaConfig */ |
|
50 | - protected $_schemaConfig; |
|
49 | + /** @var SchemaConfig */ |
|
50 | + protected $_schemaConfig; |
|
51 | 51 | |
52 | - /** |
|
53 | - * @param Table[] $tables |
|
54 | - * @param Sequence[] $sequences |
|
55 | - * @param string[] $namespaces |
|
56 | - * |
|
57 | - * @throws SchemaException |
|
58 | - */ |
|
59 | - public function __construct(array $tables = [], array $sequences = [], ?SchemaConfig $schemaConfig = null, array $namespaces = []) |
|
60 | - { |
|
61 | - } |
|
52 | + /** |
|
53 | + * @param Table[] $tables |
|
54 | + * @param Sequence[] $sequences |
|
55 | + * @param string[] $namespaces |
|
56 | + * |
|
57 | + * @throws SchemaException |
|
58 | + */ |
|
59 | + public function __construct(array $tables = [], array $sequences = [], ?SchemaConfig $schemaConfig = null, array $namespaces = []) |
|
60 | + { |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * @deprecated |
|
65 | - * |
|
66 | - * @return bool |
|
67 | - */ |
|
68 | - public function hasExplicitForeignKeyIndexes() |
|
69 | - { |
|
70 | - } |
|
63 | + /** |
|
64 | + * @deprecated |
|
65 | + * |
|
66 | + * @return bool |
|
67 | + */ |
|
68 | + public function hasExplicitForeignKeyIndexes() |
|
69 | + { |
|
70 | + } |
|
71 | 71 | |
72 | - /** |
|
73 | - * @return void |
|
74 | - * |
|
75 | - * @throws SchemaException |
|
76 | - */ |
|
77 | - protected function _addTable(Table $table) |
|
78 | - { |
|
79 | - } |
|
72 | + /** |
|
73 | + * @return void |
|
74 | + * |
|
75 | + * @throws SchemaException |
|
76 | + */ |
|
77 | + protected function _addTable(Table $table) |
|
78 | + { |
|
79 | + } |
|
80 | 80 | |
81 | - /** |
|
82 | - * @return void |
|
83 | - * |
|
84 | - * @throws SchemaException |
|
85 | - */ |
|
86 | - protected function _addSequence(Sequence $sequence) |
|
87 | - { |
|
88 | - } |
|
81 | + /** |
|
82 | + * @return void |
|
83 | + * |
|
84 | + * @throws SchemaException |
|
85 | + */ |
|
86 | + protected function _addSequence(Sequence $sequence) |
|
87 | + { |
|
88 | + } |
|
89 | 89 | |
90 | - /** |
|
91 | - * Returns the namespaces of this schema. |
|
92 | - * |
|
93 | - * @return string[] A list of namespace names. |
|
94 | - */ |
|
95 | - public function getNamespaces() |
|
96 | - { |
|
97 | - } |
|
90 | + /** |
|
91 | + * Returns the namespaces of this schema. |
|
92 | + * |
|
93 | + * @return string[] A list of namespace names. |
|
94 | + */ |
|
95 | + public function getNamespaces() |
|
96 | + { |
|
97 | + } |
|
98 | 98 | |
99 | - /** |
|
100 | - * Gets all tables of this schema. |
|
101 | - * |
|
102 | - * @return Table[] |
|
103 | - */ |
|
104 | - public function getTables() |
|
105 | - { |
|
106 | - } |
|
99 | + /** |
|
100 | + * Gets all tables of this schema. |
|
101 | + * |
|
102 | + * @return Table[] |
|
103 | + */ |
|
104 | + public function getTables() |
|
105 | + { |
|
106 | + } |
|
107 | 107 | |
108 | - /** |
|
109 | - * @param string $name |
|
110 | - * |
|
111 | - * @return Table |
|
112 | - * |
|
113 | - * @throws SchemaException |
|
114 | - */ |
|
115 | - public function getTable($name) |
|
116 | - { |
|
117 | - } |
|
108 | + /** |
|
109 | + * @param string $name |
|
110 | + * |
|
111 | + * @return Table |
|
112 | + * |
|
113 | + * @throws SchemaException |
|
114 | + */ |
|
115 | + public function getTable($name) |
|
116 | + { |
|
117 | + } |
|
118 | 118 | |
119 | - /** |
|
120 | - * Does this schema have a namespace with the given name? |
|
121 | - * |
|
122 | - * @param string $name |
|
123 | - * |
|
124 | - * @return bool |
|
125 | - */ |
|
126 | - public function hasNamespace($name) |
|
127 | - { |
|
128 | - } |
|
119 | + /** |
|
120 | + * Does this schema have a namespace with the given name? |
|
121 | + * |
|
122 | + * @param string $name |
|
123 | + * |
|
124 | + * @return bool |
|
125 | + */ |
|
126 | + public function hasNamespace($name) |
|
127 | + { |
|
128 | + } |
|
129 | 129 | |
130 | - /** |
|
131 | - * Does this schema have a table with the given name? |
|
132 | - * |
|
133 | - * @param string $name |
|
134 | - * |
|
135 | - * @return bool |
|
136 | - */ |
|
137 | - public function hasTable($name) |
|
138 | - { |
|
139 | - } |
|
130 | + /** |
|
131 | + * Does this schema have a table with the given name? |
|
132 | + * |
|
133 | + * @param string $name |
|
134 | + * |
|
135 | + * @return bool |
|
136 | + */ |
|
137 | + public function hasTable($name) |
|
138 | + { |
|
139 | + } |
|
140 | 140 | |
141 | - /** |
|
142 | - * Gets all table names, prefixed with a schema name, even the default one if present. |
|
143 | - * |
|
144 | - * @deprecated Use {@see getTables()} and {@see Table::getName()} instead. |
|
145 | - * |
|
146 | - * @return string[] |
|
147 | - */ |
|
148 | - public function getTableNames() |
|
149 | - { |
|
150 | - } |
|
141 | + /** |
|
142 | + * Gets all table names, prefixed with a schema name, even the default one if present. |
|
143 | + * |
|
144 | + * @deprecated Use {@see getTables()} and {@see Table::getName()} instead. |
|
145 | + * |
|
146 | + * @return string[] |
|
147 | + */ |
|
148 | + public function getTableNames() |
|
149 | + { |
|
150 | + } |
|
151 | 151 | |
152 | - /** |
|
153 | - * @param string $name |
|
154 | - * |
|
155 | - * @return bool |
|
156 | - */ |
|
157 | - public function hasSequence($name) |
|
158 | - { |
|
159 | - } |
|
152 | + /** |
|
153 | + * @param string $name |
|
154 | + * |
|
155 | + * @return bool |
|
156 | + */ |
|
157 | + public function hasSequence($name) |
|
158 | + { |
|
159 | + } |
|
160 | 160 | |
161 | - /** |
|
162 | - * @param string $name |
|
163 | - * |
|
164 | - * @return Sequence |
|
165 | - * |
|
166 | - * @throws SchemaException |
|
167 | - */ |
|
168 | - public function getSequence($name) |
|
169 | - { |
|
170 | - } |
|
161 | + /** |
|
162 | + * @param string $name |
|
163 | + * |
|
164 | + * @return Sequence |
|
165 | + * |
|
166 | + * @throws SchemaException |
|
167 | + */ |
|
168 | + public function getSequence($name) |
|
169 | + { |
|
170 | + } |
|
171 | 171 | |
172 | - /** @return Sequence[] */ |
|
173 | - public function getSequences() |
|
174 | - { |
|
175 | - } |
|
172 | + /** @return Sequence[] */ |
|
173 | + public function getSequences() |
|
174 | + { |
|
175 | + } |
|
176 | 176 | |
177 | - /** |
|
178 | - * Creates a new namespace. |
|
179 | - * |
|
180 | - * @param string $name The name of the namespace to create. |
|
181 | - * |
|
182 | - * @return Schema This schema instance. |
|
183 | - * |
|
184 | - * @throws SchemaException |
|
185 | - */ |
|
186 | - public function createNamespace($name) |
|
187 | - { |
|
188 | - } |
|
177 | + /** |
|
178 | + * Creates a new namespace. |
|
179 | + * |
|
180 | + * @param string $name The name of the namespace to create. |
|
181 | + * |
|
182 | + * @return Schema This schema instance. |
|
183 | + * |
|
184 | + * @throws SchemaException |
|
185 | + */ |
|
186 | + public function createNamespace($name) |
|
187 | + { |
|
188 | + } |
|
189 | 189 | |
190 | - /** |
|
191 | - * Creates a new table. |
|
192 | - * |
|
193 | - * @param string $name |
|
194 | - * |
|
195 | - * @return Table |
|
196 | - * |
|
197 | - * @throws SchemaException |
|
198 | - */ |
|
199 | - public function createTable($name) |
|
200 | - { |
|
201 | - } |
|
190 | + /** |
|
191 | + * Creates a new table. |
|
192 | + * |
|
193 | + * @param string $name |
|
194 | + * |
|
195 | + * @return Table |
|
196 | + * |
|
197 | + * @throws SchemaException |
|
198 | + */ |
|
199 | + public function createTable($name) |
|
200 | + { |
|
201 | + } |
|
202 | 202 | |
203 | - /** |
|
204 | - * Renames a table. |
|
205 | - * |
|
206 | - * @param string $oldName |
|
207 | - * @param string $newName |
|
208 | - * |
|
209 | - * @return Schema |
|
210 | - * |
|
211 | - * @throws SchemaException |
|
212 | - */ |
|
213 | - public function renameTable($oldName, $newName) |
|
214 | - { |
|
215 | - } |
|
203 | + /** |
|
204 | + * Renames a table. |
|
205 | + * |
|
206 | + * @param string $oldName |
|
207 | + * @param string $newName |
|
208 | + * |
|
209 | + * @return Schema |
|
210 | + * |
|
211 | + * @throws SchemaException |
|
212 | + */ |
|
213 | + public function renameTable($oldName, $newName) |
|
214 | + { |
|
215 | + } |
|
216 | 216 | |
217 | - /** |
|
218 | - * Drops a table from the schema. |
|
219 | - * |
|
220 | - * @param string $name |
|
221 | - * |
|
222 | - * @return Schema |
|
223 | - * |
|
224 | - * @throws SchemaException |
|
225 | - */ |
|
226 | - public function dropTable($name) |
|
227 | - { |
|
228 | - } |
|
217 | + /** |
|
218 | + * Drops a table from the schema. |
|
219 | + * |
|
220 | + * @param string $name |
|
221 | + * |
|
222 | + * @return Schema |
|
223 | + * |
|
224 | + * @throws SchemaException |
|
225 | + */ |
|
226 | + public function dropTable($name) |
|
227 | + { |
|
228 | + } |
|
229 | 229 | |
230 | - /** |
|
231 | - * Creates a new sequence. |
|
232 | - * |
|
233 | - * @param string $name |
|
234 | - * @param int $allocationSize |
|
235 | - * @param int $initialValue |
|
236 | - * |
|
237 | - * @return Sequence |
|
238 | - * |
|
239 | - * @throws SchemaException |
|
240 | - */ |
|
241 | - public function createSequence($name, $allocationSize = 1, $initialValue = 1) |
|
242 | - { |
|
243 | - } |
|
230 | + /** |
|
231 | + * Creates a new sequence. |
|
232 | + * |
|
233 | + * @param string $name |
|
234 | + * @param int $allocationSize |
|
235 | + * @param int $initialValue |
|
236 | + * |
|
237 | + * @return Sequence |
|
238 | + * |
|
239 | + * @throws SchemaException |
|
240 | + */ |
|
241 | + public function createSequence($name, $allocationSize = 1, $initialValue = 1) |
|
242 | + { |
|
243 | + } |
|
244 | 244 | |
245 | - /** |
|
246 | - * @param string $name |
|
247 | - * |
|
248 | - * @return Schema |
|
249 | - */ |
|
250 | - public function dropSequence($name) |
|
251 | - { |
|
252 | - } |
|
245 | + /** |
|
246 | + * @param string $name |
|
247 | + * |
|
248 | + * @return Schema |
|
249 | + */ |
|
250 | + public function dropSequence($name) |
|
251 | + { |
|
252 | + } |
|
253 | 253 | |
254 | - /** |
|
255 | - * Returns an array of necessary SQL queries to create the schema on the given platform. |
|
256 | - * |
|
257 | - * @return list<string> |
|
258 | - * |
|
259 | - * @throws Exception |
|
260 | - */ |
|
261 | - public function toSql(AbstractPlatform $platform) |
|
262 | - { |
|
263 | - } |
|
254 | + /** |
|
255 | + * Returns an array of necessary SQL queries to create the schema on the given platform. |
|
256 | + * |
|
257 | + * @return list<string> |
|
258 | + * |
|
259 | + * @throws Exception |
|
260 | + */ |
|
261 | + public function toSql(AbstractPlatform $platform) |
|
262 | + { |
|
263 | + } |
|
264 | 264 | |
265 | - /** |
|
266 | - * Return an array of necessary SQL queries to drop the schema on the given platform. |
|
267 | - * |
|
268 | - * @return list<string> |
|
269 | - * |
|
270 | - * @throws Exception |
|
271 | - */ |
|
272 | - public function toDropSql(AbstractPlatform $platform) |
|
273 | - { |
|
274 | - } |
|
265 | + /** |
|
266 | + * Return an array of necessary SQL queries to drop the schema on the given platform. |
|
267 | + * |
|
268 | + * @return list<string> |
|
269 | + * |
|
270 | + * @throws Exception |
|
271 | + */ |
|
272 | + public function toDropSql(AbstractPlatform $platform) |
|
273 | + { |
|
274 | + } |
|
275 | 275 | |
276 | - /** |
|
277 | - * @deprecated |
|
278 | - * |
|
279 | - * @return string[] |
|
280 | - * |
|
281 | - * @throws SchemaException |
|
282 | - */ |
|
283 | - public function getMigrateToSql(Schema $toSchema, AbstractPlatform $platform) |
|
284 | - { |
|
285 | - } |
|
276 | + /** |
|
277 | + * @deprecated |
|
278 | + * |
|
279 | + * @return string[] |
|
280 | + * |
|
281 | + * @throws SchemaException |
|
282 | + */ |
|
283 | + public function getMigrateToSql(Schema $toSchema, AbstractPlatform $platform) |
|
284 | + { |
|
285 | + } |
|
286 | 286 | |
287 | - /** |
|
288 | - * @deprecated |
|
289 | - * |
|
290 | - * @return string[] |
|
291 | - * |
|
292 | - * @throws SchemaException |
|
293 | - */ |
|
294 | - public function getMigrateFromSql(Schema $fromSchema, AbstractPlatform $platform) |
|
295 | - { |
|
296 | - } |
|
287 | + /** |
|
288 | + * @deprecated |
|
289 | + * |
|
290 | + * @return string[] |
|
291 | + * |
|
292 | + * @throws SchemaException |
|
293 | + */ |
|
294 | + public function getMigrateFromSql(Schema $fromSchema, AbstractPlatform $platform) |
|
295 | + { |
|
296 | + } |
|
297 | 297 | |
298 | - /** |
|
299 | - * @deprecated |
|
300 | - * |
|
301 | - * @return void |
|
302 | - */ |
|
303 | - public function visit(Visitor $visitor) |
|
304 | - { |
|
305 | - } |
|
298 | + /** |
|
299 | + * @deprecated |
|
300 | + * |
|
301 | + * @return void |
|
302 | + */ |
|
303 | + public function visit(Visitor $visitor) |
|
304 | + { |
|
305 | + } |
|
306 | 306 | |
307 | - /** |
|
308 | - * Cloning a Schema triggers a deep clone of all related assets. |
|
309 | - * |
|
310 | - * @return void |
|
311 | - */ |
|
312 | - public function __clone() |
|
313 | - { |
|
314 | - } |
|
307 | + /** |
|
308 | + * Cloning a Schema triggers a deep clone of all related assets. |
|
309 | + * |
|
310 | + * @return void |
|
311 | + */ |
|
312 | + public function __clone() |
|
313 | + { |
|
314 | + } |
|
315 | 315 | } |
@@ -12,9 +12,9 @@ |
||
12 | 12 | |
13 | 13 | return RectorConfig::configure() |
14 | 14 | ->withPaths([ |
15 | - __DIR__ . '/appinfo', |
|
16 | - __DIR__ . '/lib', |
|
17 | - __DIR__ . '/tests/unit', |
|
15 | + __DIR__.'/appinfo', |
|
16 | + __DIR__.'/lib', |
|
17 | + __DIR__.'/tests/unit', |
|
18 | 18 | ]) |
19 | 19 | ->withImportNames(importShortClasses: false) |
20 | 20 | ->withSets([ |
@@ -241,16 +241,16 @@ discard block |
||
241 | 241 | try { |
242 | 242 | $test = new ReflectionClass($class); |
243 | 243 | } catch (ReflectionException $e) { |
244 | - throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage()); |
|
244 | + throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage()); |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) { |
248 | - throw new FederatedEventException($class . ' does not implements IFederatedItem'); |
|
248 | + throw new FederatedEventException($class.' does not implements IFederatedItem'); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | $item = Server::get($class); |
252 | 252 | if (!($item instanceof IFederatedItem)) { |
253 | - throw new FederatedEventException($class . ' not an IFederatedItem'); |
|
253 | + throw new FederatedEventException($class.' not an IFederatedItem'); |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | if ($item instanceof IFederatedItemHighSeverity) { |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | $knownInstances = $this->memberRequest->getMemberInstances($circle->getSingleId()); |
449 | 449 | $instances = array_filter( |
450 | 450 | array_map( |
451 | - function (RemoteInstance $instance) use ($knownInstances) { |
|
451 | + function(RemoteInstance $instance) use ($knownInstances) { |
|
452 | 452 | if (!in_array($instance->getInstance(), $knownInstances)) { |
453 | 453 | return null; |
454 | 454 | } |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | if ($event->hasMember() |
464 | 464 | && !$this->configService->isLocalInstance($event->getMember()->getInstance())) { |
465 | 465 | $currentInstances = array_map( |
466 | - function (RemoteInstance $instance): string { |
|
466 | + function(RemoteInstance $instance): string { |
|
467 | 467 | return $instance->getInstance(); |
468 | 468 | }, $instances |
469 | 469 | ); |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | $l10n = Server::get(IFactory::class)->get('circles'); |
452 | 452 | $display = $l10n->t('%s (Team owned by %s)', [$display, $circle->getOwner()->getDisplayName()]); |
453 | 453 | } else { |
454 | - $display .= ' (' . Circle::$DEF_SOURCE[$circle->getSource()] . ')'; |
|
454 | + $display .= ' ('.Circle::$DEF_SOURCE[$circle->getSource()].')'; |
|
455 | 455 | } |
456 | 456 | |
457 | 457 | $share->setSharedWithDisplayName($display); |
@@ -541,22 +541,22 @@ discard block |
||
541 | 541 | |
542 | 542 | public function importFromDatabase(array $data, string $prefix = ''): IQueryRow { |
543 | 543 | $shareTime = new DateTime(); |
544 | - $shareTime->setTimestamp($this->getInt($prefix . 'stime', $data)); |
|
545 | - |
|
546 | - $this->setId($this->get($prefix . 'id', $data)) |
|
547 | - ->setShareType($this->getInt($prefix . 'share_type', $data)) |
|
548 | - ->setPermissions($this->getInt($prefix . 'permissions', $data)) |
|
549 | - ->setItemType($this->get($prefix . 'item_type', $data)) |
|
550 | - ->setItemSource($this->getInt($prefix . 'item_source', $data)) |
|
551 | - ->setItemTarget($this->get($prefix . 'item_target', $data)) |
|
552 | - ->setFileSource($this->getInt($prefix . 'file_source', $data)) |
|
553 | - ->setFileTarget($this->get($prefix . 'file_target', $data)) |
|
554 | - ->setSharedWith($this->get($prefix . 'share_with', $data)) |
|
555 | - ->setSharedBy($this->get($prefix . 'uid_initiator', $data)) |
|
556 | - ->setShareOwner($this->get($prefix . 'uid_owner', $data)) |
|
557 | - ->setToken($this->get($prefix . 'token', $data)) |
|
544 | + $shareTime->setTimestamp($this->getInt($prefix.'stime', $data)); |
|
545 | + |
|
546 | + $this->setId($this->get($prefix.'id', $data)) |
|
547 | + ->setShareType($this->getInt($prefix.'share_type', $data)) |
|
548 | + ->setPermissions($this->getInt($prefix.'permissions', $data)) |
|
549 | + ->setItemType($this->get($prefix.'item_type', $data)) |
|
550 | + ->setItemSource($this->getInt($prefix.'item_source', $data)) |
|
551 | + ->setItemTarget($this->get($prefix.'item_target', $data)) |
|
552 | + ->setFileSource($this->getInt($prefix.'file_source', $data)) |
|
553 | + ->setFileTarget($this->get($prefix.'file_target', $data)) |
|
554 | + ->setSharedWith($this->get($prefix.'share_with', $data)) |
|
555 | + ->setSharedBy($this->get($prefix.'uid_initiator', $data)) |
|
556 | + ->setShareOwner($this->get($prefix.'uid_owner', $data)) |
|
557 | + ->setToken($this->get($prefix.'token', $data)) |
|
558 | 558 | ->setShareTime($shareTime) |
559 | - ->setShareNote($this->get($prefix . 'note', $data)); |
|
559 | + ->setShareNote($this->get($prefix.'note', $data)); |
|
560 | 560 | |
561 | 561 | $this->importAttributesFromDatabase($this->get('attributes', $data)); |
562 | 562 | |
@@ -566,9 +566,9 @@ discard block |
||
566 | 566 | // $share->setPassword($this->get('password', $data, '')); |
567 | 567 | // } |
568 | 568 | |
569 | - $this->setChildId($this->getInt($prefix . 'child_id', $data)) |
|
570 | - ->setChildFileTarget($this->get($prefix . 'child_file_target', $data)) |
|
571 | - ->setChildPermissions($this->getInt($prefix . 'child_permissions', $data)) |
|
569 | + $this->setChildId($this->getInt($prefix.'child_id', $data)) |
|
570 | + ->setChildFileTarget($this->get($prefix.'child_file_target', $data)) |
|
571 | + ->setChildPermissions($this->getInt($prefix.'child_permissions', $data)) |
|
572 | 572 | ->setProviderId(ShareByCircleProvider::IDENTIFIER) |
573 | 573 | ->setStatus(Ishare::STATUS_ACCEPTED); |
574 | 574 |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $this->configService = Server::get(ConfigService::class); |
116 | 116 | $this->miscService = Server::get(MiscService::class); |
117 | 117 | } catch (QueryException $e) { |
118 | - $this->logger->info('Circles: cannot init FileSharingBroadcaster - ' . $e->getMessage(), ['exception' => $e]); |
|
118 | + $this->logger->info('Circles: cannot init FileSharingBroadcaster - '.$e->getMessage(), ['exception' => $e]); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | try { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | $allShares = $this->fileSharesRequest->getSharesForCircle($member->getCircleId()); |
262 | 262 | $knownShares = array_map( |
263 | - function (SharesToken $shareToken) { |
|
263 | + function(SharesToken $shareToken) { |
|
264 | 264 | return $shareToken->getShareId(); |
265 | 265 | }, |
266 | 266 | $this->tokensRequest->getTokensFromMember($member) |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | * @throws IllegalIDChangeException |
308 | 308 | */ |
309 | 309 | private function generateShare($data): IShare { |
310 | - $this->logger->log(0, 'Regenerate shares from payload: ' . json_encode($data)); |
|
310 | + $this->logger->log(0, 'Regenerate shares from payload: '.json_encode($data)); |
|
311 | 311 | |
312 | 312 | $share = new Share($this->rootFolder, $this->userManager); |
313 | 313 | $share->setId($data['id']); |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | ); |
400 | 400 | $this->sendPasswordByMail($share, $displayName, $email, $password); |
401 | 401 | } catch (Exception $e) { |
402 | - $this->logger->info('Circles::sharedByMail - mail were not sent: ' . $e->getMessage(), ['exception' => $e]); |
|
402 | + $this->logger->info('Circles::sharedByMail - mail were not sent: '.$e->getMessage(), ['exception' => $e]); |
|
403 | 403 | } |
404 | 404 | } |
405 | 405 | |
@@ -417,8 +417,8 @@ discard block |
||
417 | 417 | $message = $this->mailer->createMessage(); |
418 | 418 | |
419 | 419 | $this->logger->log( |
420 | - 0, "Sending mail to circle '" . $circleName . "': " . $email . ' file: ' . $fileName |
|
421 | - . ' - link: ' . $link |
|
420 | + 0, "Sending mail to circle '".$circleName."': ".$email.' file: '.$fileName |
|
421 | + . ' - link: '.$link |
|
422 | 422 | ); |
423 | 423 | |
424 | 424 | $subject = $this->l10n->t('%s shared »%s« with you.', [$author, $fileName]); |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | |
457 | 457 | $message = $this->mailer->createMessage(); |
458 | 458 | |
459 | - $this->logger->log(0, "Sending password mail to circle '" . $circleName . "': " . $email); |
|
459 | + $this->logger->log(0, "Sending password mail to circle '".$circleName."': ".$email); |
|
460 | 460 | |
461 | 461 | $filename = $share->getNode() |
462 | 462 | ->getName(); |
@@ -511,7 +511,7 @@ discard block |
||
511 | 511 | $message->setFrom([Util::getDefaultEmailAddress($instanceName) => $senderName]); |
512 | 512 | if ($initiatorEmailAddress !== null) { |
513 | 513 | $message->setReplyTo([$initiatorEmailAddress => $initiatorDisplayName]); |
514 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
514 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
515 | 515 | } else { |
516 | 516 | $emailTemplate->addFooter(); |
517 | 517 | } |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $emailTemplate->addHeader(); |
547 | 547 | $emailTemplate->addHeading($subject, false); |
548 | 548 | $emailTemplate->addBodyText( |
549 | - htmlspecialchars($text) . '<br>' . htmlspecialchars( |
|
549 | + htmlspecialchars($text).'<br>'.htmlspecialchars( |
|
550 | 550 | $this->l10n->t('Click the button below to open it.') |
551 | 551 | ), $text |
552 | 552 | ); |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | $this->sendMailExistingShares($template, $author->getCachedName(), $recipient); |
593 | 593 | $this->sendPasswordExistingShares($author, $recipient, $password); |
594 | 594 | } catch (Exception $e) { |
595 | - $this->logger->log(2, 'Failed to send mail about existing share ' . $e->getMessage()); |
|
595 | + $this->logger->log(2, 'Failed to send mail about existing share '.$e->getMessage()); |
|
596 | 596 | } |
597 | 597 | } |
598 | 598 | |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | $authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author; |
616 | 616 | $authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null; |
617 | 617 | |
618 | - $this->logger->log(0, "Sending password mail about existing files to '" . $email . "'"); |
|
618 | + $this->logger->log(0, "Sending password mail about existing files to '".$email."'"); |
|
619 | 619 | |
620 | 620 | $plainBodyPart = $this->l10n->t( |
621 | 621 | "%1\$s shared multiple files with you.\nYou should have already received a separate email with a link to access them.\n", |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | $message->setFrom([Util::getDefaultEmailAddress($instanceName) => $senderName]); |
658 | 658 | if ($authorEmail !== null) { |
659 | 659 | $message->setReplyTo([$authorEmail => $authorName]); |
660 | - $emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan()); |
|
660 | + $emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan()); |
|
661 | 661 | } else { |
662 | 662 | $emailTemplate->addFooter(); |
663 | 663 | } |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | */ |
703 | 703 | protected function generateMailExitingShares($author, $circleName) { |
704 | 704 | $this->logger->log( |
705 | - 0, "Generating mail about existing share mail from '" . $author . "' in " |
|
705 | + 0, "Generating mail about existing share mail from '".$author."' in " |
|
706 | 706 | . $circleName |
707 | 707 | ); |
708 | 708 |
@@ -133,7 +133,7 @@ |
||
133 | 133 | public function boot(IBootContext $context): void { |
134 | 134 | $serverContainer = $context->getServerContainer(); |
135 | 135 | |
136 | - $context->injectFn(function (IShareManager $shareManager) { |
|
136 | + $context->injectFn(function(IShareManager $shareManager) { |
|
137 | 137 | $shareManager->registerShareProvider(ShareByCircleProvider::class); |
138 | 138 | }); |
139 | 139 |
@@ -8,10 +8,10 @@ |
||
8 | 8 | */ |
9 | 9 | define('PHPUNIT_RUN', 1); |
10 | 10 | |
11 | -require_once __DIR__ . '/../../../lib/base.php'; |
|
12 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
11 | +require_once __DIR__.'/../../../lib/base.php'; |
|
12 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
13 | 13 | |
14 | -require_once __DIR__ . '/../../../tests/autoload.php'; |
|
14 | +require_once __DIR__.'/../../../tests/autoload.php'; |
|
15 | 15 | |
16 | 16 | \OC_App::loadApp('circles'); |
17 | 17 |