@@ -72,12 +72,12 @@ discard block |
||
| 72 | 72 | $attributeSet = $state['consent:store.attributeSet']; |
| 73 | 73 | |
| 74 | 74 | \SimpleSAML\Logger::debug( |
| 75 | - 'Consent - saveConsent() : [' . $userId . '|' . $targetedId . '|' . $attributeSet . ']' |
|
| 75 | + 'Consent - saveConsent() : ['.$userId.'|'.$targetedId.'|'.$attributeSet.']' |
|
| 76 | 76 | ); |
| 77 | 77 | try { |
| 78 | 78 | $store->saveConsent($userId, $targetedId, $attributeSet); |
| 79 | 79 | } catch (\Exception $e) { |
| 80 | - \SimpleSAML\Logger::error('Consent: Error writing to storage: ' . $e->getMessage()); |
|
| 80 | + \SimpleSAML\Logger::error('Consent: Error writing to storage: '.$e->getMessage()); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
@@ -209,38 +209,38 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | $alternate = ['odd', 'even']; |
| 211 | 211 | $i = 0; |
| 212 | - $summary = 'summary="' . $translator->t('List the information about you that is about to be transmitted to the service you are going to login to') . '"'; |
|
| 212 | + $summary = 'summary="'.$translator->t('List the information about you that is about to be transmitted to the service you are going to login to').'"'; |
|
| 213 | 213 | |
| 214 | 214 | if (strlen($nameParent) > 0) { |
| 215 | - $parentStr = strtolower($nameParent) . '_'; |
|
| 216 | - $str = '<table class="attributes" ' . $summary . '>'; |
|
| 215 | + $parentStr = strtolower($nameParent).'_'; |
|
| 216 | + $str = '<table class="attributes" '.$summary.'>'; |
|
| 217 | 217 | } else { |
| 218 | 218 | $parentStr = ''; |
| 219 | - $str = '<table id="table_with_attributes" class="attributes" ' . $summary . '>'; |
|
| 220 | - $str .= "\n" . '<caption>' . $translator->t('User information') . '</caption>'; |
|
| 219 | + $str = '<table id="table_with_attributes" class="attributes" '.$summary.'>'; |
|
| 220 | + $str .= "\n".'<caption>'.$translator->t('User information').'</caption>'; |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | foreach ($attributes as $name => $value) { |
| 224 | 224 | $nameraw = $name; |
| 225 | - $name = $translator->getAttributeTranslation($parentStr . $nameraw); |
|
| 225 | + $name = $translator->getAttributeTranslation($parentStr.$nameraw); |
|
| 226 | 226 | |
| 227 | 227 | if (preg_match('/^child_/', $nameraw)) { |
| 228 | 228 | // insert child table |
| 229 | 229 | $parentName = preg_replace('/^child_/', '', $nameraw); |
| 230 | 230 | foreach ($value as $child) { |
| 231 | - $str .= "\n" . '<tr class="odd"><td class="td_odd">' . |
|
| 232 | - present_attributes($t, $child, $parentName) . '</td></tr>'; |
|
| 231 | + $str .= "\n".'<tr class="odd"><td class="td_odd">'. |
|
| 232 | + present_attributes($t, $child, $parentName).'</td></tr>'; |
|
| 233 | 233 | } |
| 234 | 234 | } else { |
| 235 | 235 | // insert values directly |
| 236 | 236 | |
| 237 | - $str .= "\n" . '<tr class="' . $alternate[($i++ % 2)] . |
|
| 238 | - '"><td><span class="attrname">' . htmlspecialchars($name) . '</span></td>'; |
|
| 237 | + $str .= "\n".'<tr class="'.$alternate[($i++ % 2)]. |
|
| 238 | + '"><td><span class="attrname">'.htmlspecialchars($name).'</span></td>'; |
|
| 239 | 239 | |
| 240 | 240 | $isHidden = in_array($nameraw, $t->data['hiddenAttributes'], true); |
| 241 | 241 | if ($isHidden) { |
| 242 | 242 | $hiddenId = \SimpleSAML\Utils\Random::generateID(); |
| 243 | - $str .= '<td><span class="attrvalue hidden" id="hidden_' . $hiddenId . '">'; |
|
| 243 | + $str .= '<td><span class="attrvalue hidden" id="hidden_'.$hiddenId.'">'; |
|
| 244 | 244 | } else { |
| 245 | 245 | $hiddenId = ''; |
| 246 | 246 | $str .= '<td><span class="attrvalue">'; |
@@ -251,18 +251,18 @@ discard block |
||
| 251 | 251 | $str .= '<ul>'; |
| 252 | 252 | foreach ($value as $listitem) { |
| 253 | 253 | if ($nameraw === 'jpegPhoto') { |
| 254 | - $str .= '<li><img src="data:image/jpeg;base64,' . |
|
| 255 | - htmlspecialchars($listitem) . '" alt="User photo" /></li>'; |
|
| 254 | + $str .= '<li><img src="data:image/jpeg;base64,'. |
|
| 255 | + htmlspecialchars($listitem).'" alt="User photo" /></li>'; |
|
| 256 | 256 | } else { |
| 257 | - $str .= '<li>' . htmlspecialchars($listitem) . '</li>'; |
|
| 257 | + $str .= '<li>'.htmlspecialchars($listitem).'</li>'; |
|
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | 260 | $str .= '</ul>'; |
| 261 | 261 | } elseif (isset($value[0])) { |
| 262 | 262 | // we hawe only one value |
| 263 | 263 | if ($nameraw === 'jpegPhoto') { |
| 264 | - $str .= '<img src="data:image/jpeg;base64,' . |
|
| 265 | - htmlspecialchars($value[0]) . '" alt="User photo" />'; |
|
| 264 | + $str .= '<img src="data:image/jpeg;base64,'. |
|
| 265 | + htmlspecialchars($value[0]).'" alt="User photo" />'; |
|
| 266 | 266 | } else { |
| 267 | 267 | $str .= htmlspecialchars($value[0]); |
| 268 | 268 | } |
@@ -270,10 +270,10 @@ discard block |
||
| 270 | 270 | $str .= '</span>'; |
| 271 | 271 | |
| 272 | 272 | if ($isHidden) { |
| 273 | - $str .= '<div class="attrvalue consent_showattribute" id="visible_' . $hiddenId . '">'; |
|
| 273 | + $str .= '<div class="attrvalue consent_showattribute" id="visible_'.$hiddenId.'">'; |
|
| 274 | 274 | $str .= '... '; |
| 275 | - $str .= '<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_' . $hiddenId; |
|
| 276 | - $str .= '\'); SimpleSAML_hide(\'visible_' . $hiddenId . '\');">'; |
|
| 275 | + $str .= '<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_'.$hiddenId; |
|
| 276 | + $str .= '\'); SimpleSAML_hide(\'visible_'.$hiddenId.'\');">'; |
|
| 277 | 277 | $str .= $translator->t('Show attributes'); |
| 278 | 278 | $str .= '</a>'; |
| 279 | 279 | $str .= '</div>'; |