Skip to content

Commit 8afb986

Browse files
committed
[GT-184] Update code with line limit
1 parent 72afa09 commit 8afb986

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

htdocs/web_portal/views/site/view_site.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ class="header"
608608
<th>Identifier</th>
609609
<th>User</th>
610610
<th style="text-align:center;white-space: nowrap">
611-
<p>Last Renewed<p>
611+
Last Renewed
612612
</th>
613613
<th style="text-align:center;white-space: nowrap">Last Used</th>
614614
<th style="text-align:center">Write</th>
@@ -688,13 +688,17 @@ class="header"
688688
/>
689689
</td>
690690
<td style="width: 8%; text-align: center;">
691-
<?php if (!$portalIsReadOnly) :?>
691+
<?php if (!$portalIsReadOnly) :
692+
$actionURL = "index.php" .
693+
"?Page_Type=Edit_API_Authentication_Entity"
694+
. "&amp;" .
695+
"authentityid=" . $APIAuthEnt->getId()
696+
. "&amp;"
697+
. "isRenewalRequest=true"
698+
?>
692699
<form
693-
action="index.php
694-
?Page_Type=Edit_API_Authentication_Entity&amp;
695-
authentityid=<?= $APIAuthEnt->getId();?>&amp;
696-
isRenewalRequest=true"
697-
method="post"
700+
action= <?= $actionURL ?>
701+
method="post"
698702
>
699703
<button type="submit">Renew</button>
700704
</form>

lib/Gocdb_Services/APIAuthenticationService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ private function validate($data, $identifier, $type)
274274
if (
275275
$type == 'OIDC Subject' &&
276276
!preg_match(
277-
"/^([a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12})$/",
277+
"/^([a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}" .
278+
"\-[a-f0-9]{4}\-[a-f0-9]{12})$/",
278279
$identifier
279280
)
280281
) {

lib/Gocdb_Services/Site.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,8 @@ private function validIdentifier(
14961496
if (
14971497
$type == 'OIDC Subject' &&
14981498
!preg_match(
1499-
"/^([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{4}\-[a-z0-9]{12})$/",
1499+
"/^([a-z0-9]{8}\-[a-z0-9]{4}\-[a-z0-9]{4}" .
1500+
"\-[a-z0-9]{4}\-[a-z0-9]{12})$/",
15001501
$identifier
15011502
)
15021503
) {

resources/ManageAPICredentials/ManageAPICredentialsActions.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ public function deleteCreds($creds, $deleteThreshold, $isRenewalRequest)
128128
* @param bool $isRenewalRequest Flag indicating the presence
129129
* or absence of the `r`
130130
* command-line argument.
131-
* @return array [] An Array of credentials identifed
132-
* for sending warning emails.
131+
* @return array [] An Array of credentials
132+
* identifed for
133+
* sending warning emails.
133134
*/
134135
public function warnUsers(
135136
$creds,

resources/ManageAPICredentials/ManageUnusedAPICredentialsOptions.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,11 @@ public function getThreshold()
206206
*/
207207
private function tryToObtainDatetime($given)
208208
{
209-
$this->isRenewalRequest = $this->getBoolOption($given, 'renewals', 'r');
209+
$this->isRenewalRequest = $this->getBoolOption(
210+
$given,
211+
'renewals',
212+
'r'
213+
);
210214

211215
if (!$this->isRenewalRequest) {
212216
$this->isInactiveRequest = $this->getBoolOption(
@@ -216,7 +220,10 @@ private function tryToObtainDatetime($given)
216220
);
217221
}
218222

219-
$optionProvided = ($this->isRenewalRequest || $this->isInactiveRequest);
223+
$optionProvided = (
224+
$this->isRenewalRequest ||
225+
$this->isInactiveRequest
226+
);
220227

221228
if (!$optionProvided) {
222229
throw new InvalidArgumentException(

0 commit comments

Comments
 (0)