Passed
Push — master ( 5b7876...2f3067 )
by Tim
22:05 queued 19:37
created
hooks/hook_configpage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  * @param \SimpleSAML\XHTML\Template $template The template that we should alter in this hook.
13 13
  * @return void
14 14
  */
15
-function consentAdmin_hook_configpage(Template &$template): void
15
+function consentAdmin_hook_configpage(Template&$template): void
16 16
 {
17 17
     $template->data['links'][] = [
18 18
         'href' => Module::getModuleURL('consentAdmin/consentAdmin.php'),
Please login to merge, or discard this patch.
public/consentAdmin.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
     /*
78 78
      * Generate identifiers and hashes
79 79
      */
80
-    $destination = $sp_metadata['metadata-set'] . '|' . $sp_entityid;
80
+    $destination = $sp_metadata['metadata-set'].'|'.$sp_entityid;
81 81
 
82 82
     $targeted_id = \SimpleSAML\Module\consent\Auth\Process\Consent::getTargetedID($userid, $source, $destination);
83 83
     $attribute_hash = \SimpleSAML\Module\consent\Auth\Process\Consent::getAttributeHash($attributes, $hashAttributes);
84 84
 
85
-    \SimpleSAML\Logger::info('consentAdmin: user: ' . $userid);
86
-    \SimpleSAML\Logger::info('consentAdmin: target: ' . $targeted_id);
87
-    \SimpleSAML\Logger::info('consentAdmin: attribute: ' . $attribute_hash);
85
+    \SimpleSAML\Logger::info('consentAdmin: user: '.$userid);
86
+    \SimpleSAML\Logger::info('consentAdmin: target: '.$targeted_id);
87
+    \SimpleSAML\Logger::info('consentAdmin: attribute: '.$attribute_hash);
88 88
 
89 89
     // Return values
90 90
     return [$targeted_id, $attribute_hash, $attributes];
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
 // Calc correct source
127 127
 if ($as->getAuthData('saml:sp:IdP') !== null) {
128 128
     // from a remote idp (as bridge)
129
-    $source = 'saml20-idp-remote|' . $as->getAuthData('saml:sp:IdP');
129
+    $source = 'saml20-idp-remote|'.$as->getAuthData('saml:sp:IdP');
130 130
 } else {
131 131
     // from the local idp
132
-    $source = $idp_metadata['metadata-set'] . '|' . $idp_entityid;
132
+    $source = $idp_metadata['metadata-set'].'|'.$idp_entityid;
133 133
 }
134 134
 
135 135
 // Get user ID
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
 $userids = $attributes[$userid_attributename];
143 143
 
144 144
 if (empty($userids)) {
145
-    throw new \Exception('Could not generate useridentifier for storing consent. Attribute [' .
146
-        $userid_attributename . '] was not available.');
145
+    throw new \Exception('Could not generate useridentifier for storing consent. Attribute ['.
146
+        $userid_attributename.'] was not available.');
147 147
 }
148 148
 
149 149
 $userid = $userids[0];
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
     $action = $_GET["action"];
162 162
 }
163 163
 
164
-\SimpleSAML\Logger::critical('consentAdmin: sp: ' . $sp_entityid . ' action: ' . $action);
164
+\SimpleSAML\Logger::critical('consentAdmin: sp: '.$sp_entityid.' action: '.$action);
165 165
 
166 166
 // Remove services, which have consent disabled
167 167
 if (isset($idp_metadata['consent.disable'])) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     }
173 173
 }
174 174
 
175
-\SimpleSAML\Logger::info('consentAdmin: ' . $idp_entityid);
175
+\SimpleSAML\Logger::info('consentAdmin: '.$idp_entityid);
176 176
 
177 177
 // Parse consent config
178 178
 $consent_storage = \SimpleSAML\Module\consent\Store::parseStoreConfig($cA_config->getValue('consentadmin'));
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
 
265 265
     // Translate attribute-names
266 266
     foreach ($attributes_new as $orig_name => $value) {
267
-        if (isset($template->data['attribute_' . htmlspecialchars(strtolower($orig_name))])) {
268
-            $old_name = $template->data['attribute_' . htmlspecialchars(strtolower($orig_name))];
267
+        if (isset($template->data['attribute_'.htmlspecialchars(strtolower($orig_name))])) {
268
+            $old_name = $template->data['attribute_'.htmlspecialchars(strtolower($orig_name))];
269 269
         }
270 270
         $name = $translator->getAttributeTranslation(strtolower($orig_name)); // translate
271 271
 
Please login to merge, or discard this patch.