Skip to content

Commit 0970efc

Browse files
committed
Add trailing comma's
1 parent f83db24 commit 0970efc

162 files changed

Lines changed: 616 additions & 612 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
@@ -52,7 +52,7 @@ class Config
5252
*/
5353
public function __construct(
5454
protected Configuration $config,
55-
protected Session $session
55+
protected Session $session,
5656
) {
5757
$this->menu = new Menu();
5858
$this->authUtils = new Utils\Auth();
@@ -466,7 +466,7 @@ protected function getWarnings(): array
466466
$warnings[] = [
467467
Translate::noop(
468468
'You are running an outdated version of SimpleSAMLphp. Please update to <a href="' .
469-
'%latest%">the latest version</a> as soon as possible.'
469+
'%latest%">the latest version</a> as soon as possible.',
470470
),
471471
[
472472
'%latest%' => $latest['html_url'],

modules/admin/src/Controller/Federation.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Federation
6666
* @param \SimpleSAML\Configuration $config The configuration to use.
6767
*/
6868
public function __construct(
69-
protected Configuration $config
69+
protected Configuration $config,
7070
) {
7171
$this->menu = new Menu();
7272
$this->mdHandler = MetaDataStorageHandler::getMetadataHandler($config);
@@ -222,7 +222,7 @@ private function getHostedIdP(): array
222222
$saml2entities['saml20-idp'] = $this->mdHandler->getMetaDataCurrent('saml20-idp-hosted');
223223
$saml2entities['saml20-idp']['url'] = $metadataBase;
224224
$saml2entities['saml20-idp']['metadata_array'] = SAML2_IdP::getHostedMetadata(
225-
$this->mdHandler->getMetaDataCurrentEntityID('saml20-idp-hosted')
225+
$this->mdHandler->getMetaDataCurrentEntityID('saml20-idp-hosted'),
226226
);
227227
}
228228

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

237237
$builder = new SAMLBuilder($entity['entityid']);
@@ -241,7 +241,7 @@ private function getHostedIdP(): array
241241
$entity['metadata'] = Signer::sign(
242242
$builder->getEntityDescriptorText(),
243243
$entity['metadata_array'],
244-
'SAML 2 IdP'
244+
'SAML 2 IdP',
245245
);
246246
$entities[$index] = $entity;
247247
}
@@ -268,7 +268,7 @@ private function getHostedIdP(): array
268268
$adfsentities['adfs-idp'] = $this->mdHandler->getMetaDataCurrent('adfs-idp-hosted');
269269
$adfsentities['adfs-idp']['url'] = Module::getModuleURL('adfs/idp/metadata.php');
270270
$adfsentities['adfs-idp']['metadata_array'] = ADFS_IdP::getHostedMetadata(
271-
$this->mdHandler->getMetaDataCurrentEntityID('adfs-idp-hosted')
271+
$this->mdHandler->getMetaDataCurrentEntityID('adfs-idp-hosted'),
272272
);
273273
}
274274

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

283283
$builder = new SAMLBuilder($entity['entityid']);
@@ -298,7 +298,7 @@ private function getHostedIdP(): array
298298
$entity['metadata'] = Signer::sign(
299299
$builder->getEntityDescriptorText(),
300300
$entity['metadata_array'],
301-
'ADFS IdP'
301+
'ADFS IdP',
302302
);
303303
$entities[$index] = $entity;
304304
}
@@ -358,8 +358,8 @@ private function getHostedSP(): array
358358
'name',
359359
$source->getMetadata()->getOptionalLocalizedString(
360360
'OrganizationDisplayName',
361-
['en' => $source->getAuthId()]
362-
)
361+
['en' => $source->getAuthId()],
362+
),
363363
);
364364

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

529529
$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
@@ -26,7 +26,7 @@ class Sandbox
2626
*/
2727
public function __construct(
2828
protected Configuration $config,
29-
protected Session $session
29+
protected Session $session,
3030
) {
3131
}
3232

modules/admin/src/Controller/Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Test
5252
*/
5353
public function __construct(
5454
protected Configuration $config,
55-
protected Session $session
55+
protected Session $session,
5656
) {
5757
$this->menu = new Menu();
5858
$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
@@ -65,7 +65,7 @@ public function __construct(array &$config, $reserved)
6565
foreach ($values as $value) {
6666
if (!is_string($value)) {
6767
throw new Exception(
68-
'Invalid value for attribute ' . $name . ': ' . var_export($values, true)
68+
'Invalid value for attribute ' . $name . ': ' . var_export($values, true),
6969
);
7070
}
7171
}

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

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

134134
if (!$this->replace && !$this->remove && $this->replacement === false) {
135135
throw new Error\Exception(
136-
"'replacement' must be set if neither '%replace' nor " . "'%remove' are set."
136+
"'replacement' must be set if neither '%replace' nor " . "'%remove' are set.",
137137
);
138138
}
139139

@@ -174,7 +174,7 @@ public function process(array &$state): void
174174
$value = $new_value;
175175
} elseif ($this->merge === true) {
176176
$attributes[$this->target] = array_values(
177-
array_diff($attributes[$this->target], [$value])
177+
array_diff($attributes[$this->target], [$value]),
178178
);
179179
$attributes[$this->target][] = $new_value;
180180
} else {
@@ -202,16 +202,16 @@ public function process(array &$state): void
202202
$attributes[$this->target] = preg_replace(
203203
$this->pattern,
204204
$this->replacement,
205-
$attributes[$this->subject]
205+
$attributes[$this->subject],
206206
);
207207
} else {
208208
$diff = array_diff(
209209
preg_replace(
210210
$this->pattern,
211211
$this->replacement,
212-
$attributes[$this->subject]
212+
$attributes[$this->subject],
213213
),
214-
$attributes[$this->subject]
214+
$attributes[$this->subject],
215215
);
216216

217217
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
@@ -177,7 +177,7 @@ public function process(array &$state): void
177177
if (array_key_exists($regexpMatch, $allowedAttributeRegex)) {
178178
$attributes[$name] = $this->filterAttributeValues(
179179
$attributes[$name],
180-
$allowedAttributeRegex[$regexpMatch]
180+
$allowedAttributeRegex[$regexpMatch],
181181
);
182182
}
183183
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
@@ -75,7 +75,7 @@ public function __construct(array &$config, $reserved)
7575
} else {
7676
// unknown configuration option, log it and ignore the error
7777
Logger::warning(
78-
"AttributeValueMap: unknown configuration flag '" . var_export($value, true) . "'"
78+
"AttributeValueMap: unknown configuration flag '" . var_export($value, true) . "'",
7979
);
8080
}
8181
continue;
@@ -148,7 +148,7 @@ public function process(array &$state): void
148148
} else {
149149
$attributes[$this->targetattribute] = array_unique(array_merge(
150150
$attributes[$this->targetattribute],
151-
$targetvalues
151+
$targetvalues,
152152
));
153153
}
154154
}

0 commit comments

Comments
 (0)