Skip to content

Commit 74150e2

Browse files
committed
Add trailing comma's
1 parent adbd8da commit 74150e2

161 files changed

Lines changed: 598 additions & 595 deletions

File tree

Some content is hidden

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

bin/convertTranslations.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function dissectFile(array $fileInputRaw): array
120120
STDERR,
121121
"Merging (for nullify) " . count($sourcePairs) .
122122
" entries from source language (destination language has " .
123-
count($destPairs) . " already.\n"
123+
count($destPairs) . " already.\n",
124124
);
125125
$outputPairs = mergeWithSource($sourcePairs, $destPairs);
126126
foreach ($outputPairs as $key => $value) {
@@ -132,7 +132,7 @@ function dissectFile(array $fileInputRaw): array
132132
STDERR,
133133
"Merging " . count($sourcePairs) .
134134
" entries from source language (destination language has " .
135-
count($destPairs) . " already.\n"
135+
count($destPairs) . " already.\n",
136136
);
137137
$outputPairs = mergeWithSource($sourcePairs, $destPairs);
138138
break;
@@ -141,7 +141,7 @@ function dissectFile(array $fileInputRaw): array
141141
STDERR,
142142
"Codifying " . count($sourcePairs) .
143143
" entries from destination language (pool has " .
144-
count($destPairs) . " candidates).\n"
144+
count($destPairs) . " candidates).\n",
145145
);
146146
$outputPairs = codifyWithSource($sourcePairs, $destPairs);
147147
break;

bin/translateAttributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
[
6262
'en' => $defs['attribute_' . $lower]['en'],
6363
],
64-
$trans['attribute_' . $lower]
64+
$trans['attribute_' . $lower],
6565
),
6666
];
6767
}

modules/admin/src/Controller/Config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Config
5555
*/
5656
public function __construct(
5757
protected Configuration $config,
58-
protected Session $session
58+
protected Session $session,
5959
) {
6060
$this->menu = new Menu();
6161
$this->authUtils = new Utils\Auth();
@@ -461,7 +461,7 @@ protected function getWarnings(): array
461461
$warnings[] = [
462462
Translate::noop(
463463
'You are running an outdated version of SimpleSAMLphp. Please update to <a href="' .
464-
'%latest%">the latest version</a> as soon as possible.'
464+
'%latest%">the latest version</a> as soon as possible.',
465465
),
466466
[
467467
'%latest%' => $latest['html_url'],

modules/admin/src/Controller/Federation.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Federation
7272
* @param \SimpleSAML\Configuration $config The configuration to use.
7373
*/
7474
public function __construct(
75-
protected Configuration $config
75+
protected Configuration $config,
7676
) {
7777
$this->menu = new Menu();
7878
$this->mdHandler = MetaDataStorageHandler::getMetadataHandler();
@@ -225,7 +225,7 @@ private function getHostedIdP(): array
225225
$saml2entities['saml20-idp'] = $this->mdHandler->getMetaDataCurrent('saml20-idp-hosted');
226226
$saml2entities['saml20-idp']['url'] = $metadataBase;
227227
$saml2entities['saml20-idp']['metadata_array'] = SAML2_IdP::getHostedMetadata(
228-
$this->mdHandler->getMetaDataCurrentEntityID('saml20-idp-hosted')
228+
$this->mdHandler->getMetaDataCurrentEntityID('saml20-idp-hosted'),
229229
);
230230
}
231231

@@ -234,7 +234,7 @@ private function getHostedIdP(): array
234234
Assert::maxLength(
235235
$entity['entityid'],
236236
C::SAML2INT_ENTITYID_MAX_LENGTH,
237-
sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH)
237+
sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH),
238238
);
239239

240240
$builder = new SAMLBuilder($entity['entityid']);
@@ -244,7 +244,7 @@ private function getHostedIdP(): array
244244
$entity['metadata'] = Signer::sign(
245245
$builder->getEntityDescriptorText(),
246246
$entity['metadata_array'],
247-
'SAML 2 IdP'
247+
'SAML 2 IdP',
248248
);
249249
$entities[$index] = $entity;
250250
}
@@ -271,7 +271,7 @@ private function getHostedIdP(): array
271271
$adfsentities['adfs-idp'] = $this->mdHandler->getMetaDataCurrent('adfs-idp-hosted');
272272
$adfsentities['adfs-idp']['url'] = Module::getModuleURL('adfs/idp/metadata.php');
273273
$adfsentities['adfs-idp']['metadata_array'] = ADFS_IdP::getHostedMetadata(
274-
$this->mdHandler->getMetaDataCurrentEntityID('adfs-idp-hosted')
274+
$this->mdHandler->getMetaDataCurrentEntityID('adfs-idp-hosted'),
275275
);
276276
}
277277

@@ -280,7 +280,7 @@ private function getHostedIdP(): array
280280
Assert::maxLength(
281281
$entity['entityid'],
282282
C::SAML2INT_ENTITYID_MAX_LENGTH,
283-
sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH)
283+
sprintf('The entityID cannot be longer than %d characters.', C::SAML2INT_ENTITYID_MAX_LENGTH),
284284
);
285285

286286
$builder = new SAMLBuilder($entity['entityid']);
@@ -295,7 +295,7 @@ private function getHostedIdP(): array
295295
$entity['metadata'] = Signer::sign(
296296
$builder->getEntityDescriptorText(),
297297
$entity['metadata_array'],
298-
'ADFS IdP'
298+
'ADFS IdP',
299299
);
300300
$entities[$index] = $entity;
301301
}
@@ -364,8 +364,8 @@ private function getHostedSP(): array
364364
'name',
365365
$source->getMetadata()->getOptionalLocalizedString(
366366
'OrganizationDisplayName',
367-
['en' => $source->getAuthId()]
368-
)
367+
['en' => $source->getAuthId()],
368+
),
369369
);
370370

371371
$builder = new SAMLBuilder($source->getEntityId());
@@ -522,7 +522,7 @@ public function downloadCert(Request $request): Response
522522
$response = new Response($certInfo['PEM']);
523523
$disposition = $response->headers->makeDisposition(
524524
ResponseHeaderBag::DISPOSITION_ATTACHMENT,
525-
'cert.pem'
525+
'cert.pem',
526526
);
527527

528528
$response->headers->set('Content-Disposition', $disposition);

modules/admin/src/Controller/Sandbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Sandbox
2525
*/
2626
public function __construct(
2727
protected Configuration $config,
28-
protected Session $session
28+
protected Session $session,
2929
) {
3030
}
3131

modules/admin/src/Controller/Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Test
5454
*/
5555
public function __construct(
5656
protected Configuration $config,
57-
protected Session $session
57+
protected Session $session,
5858
) {
5959
$this->menu = new Menu();
6060
$this->authUtils = new Utils\Auth();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(array &$config, $reserved)
5858
foreach ($values as $value) {
5959
if (!is_string($value)) {
6060
throw new Exception(
61-
'Invalid value for attribute ' . $name . ': ' . var_export($values, true)
61+
'Invalid value for attribute ' . $name . ': ' . var_export($values, true),
6262
);
6363
}
6464
}

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function process(array &$state): void
124124

125125
if (!$this->replace && !$this->remove && $this->replacement === false) {
126126
throw new Error\Exception(
127-
"'replacement' must be set if neither '%replace' nor " . "'%remove' are set."
127+
"'replacement' must be set if neither '%replace' nor " . "'%remove' are set.",
128128
);
129129
}
130130

@@ -165,7 +165,7 @@ public function process(array &$state): void
165165
$value = $new_value;
166166
} elseif ($this->merge === true) {
167167
$attributes[$this->target] = array_values(
168-
array_diff($attributes[$this->target], [$value])
168+
array_diff($attributes[$this->target], [$value]),
169169
);
170170
$attributes[$this->target][] = $new_value;
171171
} else {
@@ -193,16 +193,16 @@ public function process(array &$state): void
193193
$attributes[$this->target] = preg_replace(
194194
$this->pattern,
195195
$this->replacement,
196-
$attributes[$this->subject]
196+
$attributes[$this->subject],
197197
);
198198
} else {
199199
$diff = array_diff(
200200
preg_replace(
201201
$this->pattern,
202202
$this->replacement,
203-
$attributes[$this->subject]
203+
$attributes[$this->subject],
204204
),
205-
$attributes[$this->subject]
205+
$attributes[$this->subject],
206206
);
207207

208208
if ($this->merge === true) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function process(array &$state): void
179179
if (array_key_exists($regexpMatch, $allowedAttributeRegex)) {
180180
$attributes[$name] = $this->filterAttributeValues(
181181
$attributes[$name],
182-
$allowedAttributeRegex[$regexpMatch]
182+
$allowedAttributeRegex[$regexpMatch],
183183
);
184184
}
185185
if (!empty($attributes[$name])) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function __construct(array &$config, $reserved)
6969
} else {
7070
// unknown configuration option, log it and ignore the error
7171
Logger::warning(
72-
"AttributeValueMap: unknown configuration flag '" . var_export($value, true) . "'"
72+
"AttributeValueMap: unknown configuration flag '" . var_export($value, true) . "'",
7373
);
7474
}
7575
continue;
@@ -142,7 +142,7 @@ public function process(array &$state): void
142142
} else {
143143
$attributes[$this->targetattribute] = array_unique(array_merge(
144144
$attributes[$this->targetattribute],
145-
$targetvalues
145+
$targetvalues,
146146
));
147147
}
148148
}

0 commit comments

Comments
 (0)