Skip to content

Commit

Permalink
PSR-12
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Oct 3, 2019
1 parent 244d365 commit 8fa9aaa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions lib/Auth/Process/SmartID.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,20 @@ private function addID($attributes, $request)
foreach ($this->candidates as $idCandidate) {
if (isset($attributes[$idCandidate][0])) {
if (($this->add_authority) && (isset($state['saml:AuthenticatingAuthority'][0]))) {
return ($this->add_candidate ? $idCandidate.':' : '').$attributes[$idCandidate][0].'!'.
return ($this->add_candidate ? $idCandidate . ':' : '') . $attributes[$idCandidate][0] . '!' .
$state['saml:AuthenticatingAuthority'][0];
} else {
return ($this->add_candidate ? $idCandidate.':' : '').$attributes[$idCandidate][0];
return ($this->add_candidate ? $idCandidate . ':' : '') . $attributes[$idCandidate][0];
}
}
}
/*
* At this stage no usable id_candidate has been detected.
*/
throw new \SimpleSAML\Error\Exception('This service needs at least one of the following
attributes to identity users: '.implode(', ', $this->candidates).'. Unfortunately not
one of them was detected. Please ask your institution administrator to release one of
them, or try using another identity provider.');
throw new \SimpleSAML\Error\Exception('This service needs at least one of the following ' .
'attributes to identity users: '.implode(', ', $this->candidates).'. Unfortunately not '.
'one of them was detected. Please ask your institution administrator to release one of '.
'them, or try using another identity provider.');
}


Expand Down
2 changes: 1 addition & 1 deletion lib/Auth/Process/SmartName.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private function getFullName($attributes)
}

if (isset($attributes['sn']) && isset($attributes['givenName'])) {
return $attributes['givenName'][0].' '.$attributes['sn'][0];
return $attributes['givenName'][0] . ' ' . $attributes['sn'][0];
}

if (isset($attributes['cn'])) {
Expand Down
4 changes: 2 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

$projectRoot = dirname(__DIR__);
require_once($projectRoot.'/vendor/autoload.php');
require_once($projectRoot . '/vendor/autoload.php');

// Symlink module into ssp vendor lib so that templates and urls can resolve correctly
$linkPath = $projectRoot.'/vendor/simplesamlphp/simplesamlphp/modules/negotiate';
$linkPath = $projectRoot . '/vendor/simplesamlphp/simplesamlphp/modules/negotiate';
if (file_exists($linkPath) === false) {
echo "Linking '$linkPath' to '$projectRoot'\n";
symlink($projectRoot, $linkPath);
Expand Down

0 comments on commit 8fa9aaa

Please sign in to comment.