From 68ad0facc3650a224925023ee9de067c2c0daff8 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Wed, 5 Jan 2022 14:33:15 +0000 Subject: [PATCH] Fix for PHP code sniffer, no functional changes --- lib/SimpleSAML/Utils/XML.php | 9 ++++----- modules/admin/lib/Controller/Federation.php | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/SimpleSAML/Utils/XML.php b/lib/SimpleSAML/Utils/XML.php index e15b9084c..01536ee8c 100644 --- a/lib/SimpleSAML/Utils/XML.php +++ b/lib/SimpleSAML/Utils/XML.php @@ -102,11 +102,10 @@ class XML // see if debugging is enabled for SAML messages $debug = Configuration::getInstance()->getArray('debug', ['saml' => false]); - if ( - !(in_array('saml', $debug, true) // implicitly enabled - || (array_key_exists('saml', $debug) - && $debug['saml'] === true) // explicitly enabled - ) + if (!( + in_array('saml', $debug, true) || // implicitly enabled + (array_key_exists('saml', $debug) && $debug['saml'] === true) // explicitly enabled + ) ) { // debugging messages is disabled return; diff --git a/modules/admin/lib/Controller/Federation.php b/modules/admin/lib/Controller/Federation.php index 81bb898ac..1b97aae10 100644 --- a/modules/admin/lib/Controller/Federation.php +++ b/modules/admin/lib/Controller/Federation.php @@ -121,7 +121,8 @@ class Federation $entries = [ 'hosted' => array_merge($hostedSPs, $hostedIdPs), 'remote' => [ - 'saml20-idp-remote' => !empty($hostedSPs) ? $this->mdHandler->getList('saml20-idp-remote', true) : [], + 'saml20-idp-remote' => !empty($hostedSPs) + ? $this->mdHandler->getList('saml20-idp-remote', true) : [], 'saml20-sp-remote' => $this->config->getBoolean('enable.saml20-idp', false) === true ? $this->mdHandler->getList('saml20-sp-remote', true) : [], 'adfs-sp-remote' => ($this->config->getBoolean('enable.adfs-idp', false) === true) && -- GitLab