Skip to content

Commit 51faedd

Browse files
committed
Add trailing commas
1 parent 8051401 commit 51faedd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+356
-355
lines changed

modules/admin/src/Controller/Config.php

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ public function main(/** @scrutinizer ignore-unused */ Request $request): Respon
130130
'links' => [
131131
[
132132
'href' => Module::getModuleURL('admin/diagnostics'),
133-
'text' => Translate::noop('Diagnostics on hostname, port and protocol')
133+
'text' => Translate::noop('Diagnostics on hostname, port and protocol'),
134134
],
135135
[
136136
'href' => Module::getModuleURL('admin/phpinfo'),
137-
'text' => Translate::noop('Information on your PHP installation')
138-
]
137+
'text' => Translate::noop('Information on your PHP installation'),
138+
],
139139
],
140140
'enablematrix' => [
141141
'saml20idp' => $this->config->getOptionalBoolean('enable.saml20-idp', false),
@@ -211,11 +211,11 @@ protected function getPrerequisiteChecks(): array
211211
Translate::noop('PHP %minimum% or newer is needed. You are running: %current%'),
212212
[
213213
'%minimum%' => '8.1',
214-
'%current%' => explode('-', phpversion())[0]
215-
]
214+
'%current%' => explode('-', phpversion())[0],
215+
],
216216
],
217-
'enabled' => version_compare(phpversion(), '8.1', '>=')
218-
]
217+
'enabled' => version_compare(phpversion(), '8.1', '>='),
218+
],
219219
];
220220
$store = $this->config->getOptionalString('store.type', null);
221221
$checkforupdates = $this->config->getOptionalBoolean('admin.checkforupdates', true);
@@ -226,93 +226,93 @@ protected function getPrerequisiteChecks(): array
226226
'required' => 'required',
227227
'descr' => [
228228
'required' => Translate::noop('Date/Time Extension'),
229-
]
229+
],
230230
],
231231
'hash' => [
232232
'required' => 'required',
233233
'descr' => [
234234
'required' => Translate::noop('Hashing function'),
235-
]
235+
],
236236
],
237237
'gzinflate' => [
238238
'required' => 'required',
239239
'descr' => [
240240
'required' => Translate::noop('ZLib'),
241-
]
241+
],
242242
],
243243
'openssl_sign' => [
244244
'required' => 'required',
245245
'descr' => [
246246
'required' => Translate::noop('OpenSSL'),
247-
]
247+
],
248248
],
249249
'dom_import_simplexml' => [
250250
'required' => 'required',
251251
'descr' => [
252252
'required' => Translate::noop('XML DOM'),
253-
]
253+
],
254254
],
255255
'preg_match' => [
256256
'required' => 'required',
257257
'descr' => [
258258
'required' => Translate::noop('Regular expression support'),
259-
]
259+
],
260260
],
261261
'intl_get_error_code' => [
262262
'required' => 'optional',
263263
'descr' => [
264264
'optional' => Translate::noop('PHP intl extension'),
265-
]
265+
],
266266
],
267267
'json_decode' => [
268268
'required' => 'required',
269269
'descr' => [
270270
'required' => Translate::noop('JSON support'),
271-
]
271+
],
272272
],
273273
'class_implements' => [
274274
'required' => 'required',
275275
'descr' => [
276276
'required' => Translate::noop('Standard PHP library (SPL)'),
277-
]
277+
],
278278
],
279279
'mb_strlen' => [
280280
'required' => 'required',
281281
'descr' => [
282282
'required' => Translate::noop('Multibyte String extension'),
283-
]
283+
],
284284
],
285285
'curl_init' => [
286286
'required' => ($checkforupdates === true) ? 'required' : 'optional',
287287
'descr' => [
288288
'optional' => Translate::noop(
289-
'cURL (might be required by some modules)'
289+
'cURL (might be required by some modules)',
290290
),
291291
'required' => Translate::noop(
292-
'cURL (required if automatic version checks are used, also by some modules)'
292+
'cURL (required if automatic version checks are used, also by some modules)',
293293
),
294-
]
294+
],
295295
],
296296
'session_start' => [
297297
'required' => $store === 'phpsession' ? 'required' : 'optional',
298298
'descr' => [
299299
'optional' => Translate::noop('Session extension (required if PHP sessions are used)'),
300300
'required' => Translate::noop('Session extension'),
301-
]
301+
],
302302
],
303303
'pdo_drivers' => [
304304
'required' => $store === 'sql' ? 'required' : 'optional',
305305
'descr' => [
306306
'optional' => Translate::noop('PDO Extension (required if a database backend is used)'),
307307
'required' => Translate::noop('PDO extension'),
308-
]
308+
],
309309
],
310310
'ldap_bind' => [
311311
'required' => Module::isModuleEnabled('ldap') ? 'required' : 'optional',
312312
'descr' => [
313313
'optional' => Translate::noop('LDAP extension (required if an LDAP backend is used)'),
314314
'required' => Translate::noop('LDAP extension'),
315-
]
315+
],
316316
],
317317
];
318318

@@ -332,18 +332,18 @@ protected function getPrerequisiteChecks(): array
332332
'descr' => [
333333
'optional' => Translate::noop('predis/predis (required if the redis data store is used)'),
334334
'required' => Translate::noop('predis/predis library'),
335-
]
335+
],
336336
],
337337
[
338338
'classes' => ['\Memcache', '\Memcached'],
339339
'required' => $store === 'memcache' ? 'required' : 'optional',
340340
'descr' => [
341341
'optional' => Translate::noop(
342-
'Memcache or Memcached extension (required if the memcache backend is used)'
342+
'Memcache or Memcached extension (required if the memcache backend is used)',
343343
),
344344
'required' => Translate::noop('Memcache or Memcached extension'),
345-
]
346-
]
345+
],
346+
],
347347
];
348348

349349
foreach ($libs as $lib) {
@@ -413,7 +413,7 @@ protected function getWarnings(): array
413413
'<strong>You are not using HTTPS</strong> to protect communications with your users. HTTP works fine ' .
414414
'for testing purposes, but in a production environment you should use HTTPS. <a ' .
415415
'href="https://simplesamlphp.org/docs/stable/simplesamlphp-maintenance">Read more about the ' .
416-
'maintenance of SimpleSAMLphp</a>.'
416+
'maintenance of SimpleSAMLphp</a>.',
417417
);
418418
}
419419

@@ -424,7 +424,7 @@ protected function getWarnings(): array
424424
'<strong>The configuration uses the default secret salt</strong>. Make sure to modify the <code>' .
425425
'secretsalt</code> option in the SimpleSAMLphp configuration in production environments. <a ' .
426426
'href="https://simplesamlphp.org/docs/stable/simplesamlphp-install">Read more about the ' .
427-
'maintenance of SimpleSAMLphp</a>.'
427+
'maintenance of SimpleSAMLphp</a>.',
428428
);
429429
} elseif (str_contains($secretSalt, '%')) {
430430
$warnings[] = Translate::noop(
@@ -440,7 +440,7 @@ protected function getWarnings(): array
440440
if (($checkforupdates === true) && $this->config->getVersion() !== 'dev-master') {
441441
if (!function_exists('curl_init')) {
442442
$warnings[] = Translate::noop(
443-
'The cURL PHP extension is missing. Cannot check for SimpleSAMLphp updates.'
443+
'The cURL PHP extension is missing. Cannot check for SimpleSAMLphp updates.',
444444
);
445445
} else {
446446
$latest = $this->session->getData(self::LATEST_VERSION_STATE_KEY, "version");

modules/admin/src/Controller/Federation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function main(/** @scrutinizer ignore-unused */ Request $request): Respon
162162
[
163163
'href' => Module::getModuleURL('admin/federation/metadata-converter'),
164164
'text' => Translate::noop('XML to SimpleSAMLphp metadata converter'),
165-
]
165+
],
166166
],
167167
'entries' => $entries,
168168
'mdtype' => [

modules/admin/src/Controller/Menu.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public function __construct()
3838
],
3939
'federation' => [
4040
'url' => Module::getModuleURL('admin/federation'),
41-
'name' => Translate::noop('Federation')
42-
]
41+
'name' => Translate::noop('Federation'),
42+
],
4343
];
4444
}
4545

modules/core/src/Auth/Process/Cardinality.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ public function process(array &$state): void
143143
$k,
144144
$entityid,
145145
$this->cardinality[$k]['min'],
146-
count($v)
147-
)
146+
count($v),
147+
),
148148
);
149149
} else {
150150
$state['core:cardinality:errorAttributes'][$k] = [
151151
count($v),
152-
$this->cardinality[$k]['_expr']
152+
$this->cardinality[$k]['_expr'],
153153
];
154154
}
155155
continue;
@@ -164,13 +164,13 @@ public function process(array &$state): void
164164
$k,
165165
$entityid,
166166
$this->cardinality[$k]['max'],
167-
count($v)
168-
)
167+
count($v),
168+
),
169169
);
170170
} else {
171171
$state['core:cardinality:errorAttributes'][$k] = [
172172
count($v),
173-
$this->cardinality[$k]['_expr']
173+
$this->cardinality[$k]['_expr'],
174174
];
175175
}
176176
continue;
@@ -186,12 +186,12 @@ public function process(array &$state): void
186186
Logger::warning(sprintf(
187187
'Cardinality: attribute %s from %s is missing',
188188
$k,
189-
$entityid
189+
$entityid,
190190
));
191191
} else {
192192
$state['core:cardinality:errorAttributes'][$k] = [
193193
0,
194-
$this->cardinality[$k]['_expr']
194+
$this->cardinality[$k]['_expr'],
195195
];
196196
}
197197
}

modules/core/src/Controller/Login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private function handleLogin(Request $request, UserPassBase|UserPassOrgBase $sou
227227
$errorParams = $e->getParameters();
228228
$state['error'] = [
229229
'code' => $errorCode,
230-
'params' => $errorParams
230+
'params' => $errorParams,
231231
];
232232
$authStateId = Auth\State::saveState($state, $source::STAGEID);
233233
}

modules/core/src/Storage/SQLPermanentStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private function insert(string $type, string $key1, string $key2, string $value,
121121
$data = [':key1' => $key1, ':key2' => $key2,
122122
':type' => $type, ':created' => time(),
123123
':updated' => time(), ':expire' => $expire,
124-
':value' => serialize($value)
124+
':value' => serialize($value),
125125
];
126126
$prepared->execute($data);
127127
$results = $prepared->fetchAll(PDO::FETCH_ASSOC);
@@ -146,7 +146,7 @@ private function update(string $type, string $key1, string $key2, string $value,
146146
$prepared = $this->db->prepare($query);
147147
$data = [':key1' => $key1, ':key2' => $key2,
148148
':type' => $type, ':updated' => time(),
149-
':expire' => $expire, ':value' => serialize($value)
149+
':expire' => $expire, ':value' => serialize($value),
150150
];
151151
$prepared->execute($data);
152152
$results = $prepared->fetchAll(PDO::FETCH_ASSOC);

modules/saml/src/Auth/Process/FilterScopes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FilterScopes extends Auth\ProcessingFilter
2727
*/
2828
private array $scopedAttributes = [
2929
'eduPersonScopedAffiliation',
30-
'eduPersonPrincipalName'
30+
'eduPersonPrincipalName',
3131
];
3232

3333
/**

modules/saml/src/Auth/Process/SQLPersistentNameID.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ protected function getValue(array &$state): ?string
120120

121121
$validNameIdFormats = @array_filter([
122122
$state['saml:NameIDFormat'],
123-
$state['SPMetadata']['NameIDFormat']
123+
$state['SPMetadata']['NameIDFormat'],
124124
]);
125125
if (
126126
count($validNameIdFormats)

modules/saml/src/Auth/Source/SP.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ private function startDisco(array $state): RedirectResponse
742742
$params = [
743743
'entityID' => $this->entityId,
744744
'return' => $returnTo,
745-
'returnIDParam' => 'idpentityid'
745+
'returnIDParam' => 'idpentityid',
746746
];
747747

748748
if (isset($state['saml:IDPList'])) {
@@ -1077,7 +1077,7 @@ public function startSLO2(Configuration $config, array &$state): ?Response
10771077
'SingleLogoutService',
10781078
[
10791079
C::BINDING_HTTP_REDIRECT,
1080-
C::BINDING_HTTP_POST
1080+
C::BINDING_HTTP_POST,
10811081
],
10821082
false
10831083
);

modules/saml/src/Controller/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ public function singleLogoutService(Request $request, string $sourceId): Respons
570570
'SingleLogoutService',
571571
[
572572
C::BINDING_HTTP_REDIRECT,
573-
C::BINDING_HTTP_POST
573+
C::BINDING_HTTP_POST,
574574
]
575575
);
576576

0 commit comments

Comments
 (0)