Skip to content
Snippets Groups Projects
Commit 08aaa966 authored by Andrew Hoffmann's avatar Andrew Hoffmann
Browse files

Group conditional logic to clarify precedence

It may not be clear to the developer that `&&` takes precedence over `||`. This change was recommended by a code quality scan.
parent 737771f2
No related branches found
No related tags found
1 merge request!12Test all the things!
......@@ -27,8 +27,8 @@ class FederatedPreauthUserDetailsProvider extends UserDetailsProvider
public function loadUser()
{
// Return null if no Shib session is found
if ($this->httpHeaders && !getenv(static::SHIB_SESSION_ID_HTTP) ||
!$this->httpHeaders && !getenv(static::SHIB_SESSION_ID)) {
if (($this->httpHeaders && !getenv(static::SHIB_SESSION_ID_HTTP)) ||
(!$this->httpHeaders && !getenv(static::SHIB_SESSION_ID))) {
return null;
}
......
......@@ -29,8 +29,8 @@ class PreauthUserDetailsProvider extends UserDetailsProvider
public function loadUser()
{
// Return null if no Shib session is found
if ($this->httpHeaders && !getenv(static::SHIB_SESSION_ID_HTTP) ||
!$this->httpHeaders && !getenv(static::SHIB_SESSION_ID)) {
if (($this->httpHeaders && !getenv(static::SHIB_SESSION_ID_HTTP)) ||
(!$this->httpHeaders && !getenv(static::SHIB_SESSION_ID))) {
return null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment