Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
tmilos committed May 23, 2018
1 parent 91d2470 commit 37136e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/LightSaml/SpBundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function discoveryAction()
{
$parties = $this->get('lightsaml.container.build')->getPartyContainer()->getIdpEntityDescriptorStore()->all();

if (count($parties) == 1) {
if (1 == count($parties)) {
return $this->redirect($this->generateUrl('lightsaml_sp.login', ['idp' => $parties[0]->getEntityID()]));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private function mapAttributeValues(array $attributes, Attribute $attribute)
$key = $attribute->getName();
$value = $attribute->getAllAttributeValues();

if (!array_key_exists($key, $attributes) && count($value) === 1) {
if (!array_key_exists($key, $attributes) && 1 === count($value)) {
$value = array_shift($value);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private function getUsernameFromAssertion(Assertion $assertion)
if ($assertion->getSubject() &&
$assertion->getSubject()->getNameID() &&
$assertion->getSubject()->getNameID()->getValue() &&
$assertion->getSubject()->getNameID()->getFormat() != SamlConstants::NAME_ID_FORMAT_TRANSIENT
SamlConstants::NAME_ID_FORMAT_TRANSIENT != $assertion->getSubject()->getNameID()->getFormat()
) {
return $assertion->getSubject()->getNameID()->getValue();
}
Expand Down

0 comments on commit 37136e7

Please sign in to comment.