@@ -103,12 +103,12 @@ discard block |
||
| 103 | 103 | $attributeSet = $state['consent:store.attributeSet']; |
| 104 | 104 | |
| 105 | 105 | Logger::debug( |
| 106 | - 'Consent - saveConsent() : [' . $userId . '|' . $targetedId . '|' . $attributeSet . ']' |
|
| 106 | + 'Consent - saveConsent() : ['.$userId.'|'.$targetedId.'|'.$attributeSet.']' |
|
| 107 | 107 | ); |
| 108 | 108 | try { |
| 109 | 109 | $store->saveConsent($userId, $targetedId, $attributeSet); |
| 110 | 110 | } catch (Exception $e) { |
| 111 | - Logger::error('Consent: Error writing to storage: ' . $e->getMessage()); |
|
| 111 | + Logger::error('Consent: Error writing to storage: '.$e->getMessage()); |
|
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
@@ -322,38 +322,38 @@ discard block |
||
| 322 | 322 | |
| 323 | 323 | $alternate = ['odd', 'even']; |
| 324 | 324 | $i = 0; |
| 325 | - $summary = 'summary="' . $translator->t('List the information about you that is about to be transmitted to the service you are going to login to') . '"'; |
|
| 325 | + $summary = 'summary="'.$translator->t('List the information about you that is about to be transmitted to the service you are going to login to').'"'; |
|
| 326 | 326 | |
| 327 | 327 | if (strlen($nameParent) > 0) { |
| 328 | - $parentStr = strtolower($nameParent) . '_'; |
|
| 329 | - $str = '<table class="attributes" ' . $summary . '>'; |
|
| 328 | + $parentStr = strtolower($nameParent).'_'; |
|
| 329 | + $str = '<table class="attributes" '.$summary.'>'; |
|
| 330 | 330 | } else { |
| 331 | 331 | $parentStr = ''; |
| 332 | - $str = '<table id="table_with_attributes" class="attributes" ' . $summary . '>'; |
|
| 333 | - $str .= "\n" . '<caption>' . $translator->t('User information') . '</caption>'; |
|
| 332 | + $str = '<table id="table_with_attributes" class="attributes" '.$summary.'>'; |
|
| 333 | + $str .= "\n".'<caption>'.$translator->t('User information').'</caption>'; |
|
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | foreach ($attributes as $name => $value) { |
| 337 | 337 | $nameraw = $name; |
| 338 | - $name = $translator->getAttributeTranslation($parentStr . $nameraw); |
|
| 338 | + $name = $translator->getAttributeTranslation($parentStr.$nameraw); |
|
| 339 | 339 | |
| 340 | 340 | if (preg_match('/^child_/', $nameraw)) { |
| 341 | 341 | // insert child table |
| 342 | 342 | $parentName = preg_replace('/^child_/', '', $nameraw); |
| 343 | 343 | foreach ($value as $child) { |
| 344 | - $str .= "\n" . '<tr class="odd"><td class="td_odd">' . |
|
| 345 | - $this->presentAttributes($t, $child, $parentName) . '</td></tr>'; |
|
| 344 | + $str .= "\n".'<tr class="odd"><td class="td_odd">'. |
|
| 345 | + $this->presentAttributes($t, $child, $parentName).'</td></tr>'; |
|
| 346 | 346 | } |
| 347 | 347 | } else { |
| 348 | 348 | // insert values directly |
| 349 | 349 | |
| 350 | - $str .= "\n" . '<tr class="' . $alternate[($i++ % 2)] . |
|
| 351 | - '"><td><span class="attrname">' . htmlspecialchars($name) . '</span></td>'; |
|
| 350 | + $str .= "\n".'<tr class="'.$alternate[($i++ % 2)]. |
|
| 351 | + '"><td><span class="attrname">'.htmlspecialchars($name).'</span></td>'; |
|
| 352 | 352 | |
| 353 | 353 | $isHidden = in_array($nameraw, $t->data['hiddenAttributes'], true); |
| 354 | 354 | if ($isHidden) { |
| 355 | 355 | $hiddenId = Utils\Random::generateID(); |
| 356 | - $str .= '<td><span class="attrvalue hidden" id="hidden_' . $hiddenId . '">'; |
|
| 356 | + $str .= '<td><span class="attrvalue hidden" id="hidden_'.$hiddenId.'">'; |
|
| 357 | 357 | } else { |
| 358 | 358 | $hiddenId = ''; |
| 359 | 359 | $str .= '<td><span class="attrvalue">'; |
@@ -364,18 +364,18 @@ discard block |
||
| 364 | 364 | $str .= '<ul>'; |
| 365 | 365 | foreach ($value as $listitem) { |
| 366 | 366 | if ($nameraw === 'jpegPhoto') { |
| 367 | - $str .= '<li><img src="data:image/jpeg;base64,' . |
|
| 368 | - htmlspecialchars($listitem) . '" alt="User photo" /></li>'; |
|
| 367 | + $str .= '<li><img src="data:image/jpeg;base64,'. |
|
| 368 | + htmlspecialchars($listitem).'" alt="User photo" /></li>'; |
|
| 369 | 369 | } else { |
| 370 | - $str .= '<li>' . htmlspecialchars($listitem) . '</li>'; |
|
| 370 | + $str .= '<li>'.htmlspecialchars($listitem).'</li>'; |
|
| 371 | 371 | } |
| 372 | 372 | } |
| 373 | 373 | $str .= '</ul>'; |
| 374 | 374 | } elseif (isset($value[0])) { |
| 375 | 375 | // we hawe only one value |
| 376 | 376 | if ($nameraw === 'jpegPhoto') { |
| 377 | - $str .= '<img src="data:image/jpeg;base64,' . |
|
| 378 | - htmlspecialchars($value[0]) . '" alt="User photo" />'; |
|
| 377 | + $str .= '<img src="data:image/jpeg;base64,'. |
|
| 378 | + htmlspecialchars($value[0]).'" alt="User photo" />'; |
|
| 379 | 379 | } else { |
| 380 | 380 | $str .= htmlspecialchars($value[0]); |
| 381 | 381 | } |
@@ -383,10 +383,10 @@ discard block |
||
| 383 | 383 | $str .= '</span>'; |
| 384 | 384 | |
| 385 | 385 | if ($isHidden) { |
| 386 | - $str .= '<div class="attrvalue consent_showattribute" id="visible_' . $hiddenId . '">'; |
|
| 386 | + $str .= '<div class="attrvalue consent_showattribute" id="visible_'.$hiddenId.'">'; |
|
| 387 | 387 | $str .= '... '; |
| 388 | - $str .= '<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_' . $hiddenId; |
|
| 389 | - $str .= '\'); SimpleSAML_hide(\'visible_' . $hiddenId . '\');">'; |
|
| 388 | + $str .= '<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_'.$hiddenId; |
|
| 389 | + $str .= '\'); SimpleSAML_hide(\'visible_'.$hiddenId.'\');">'; |
|
| 390 | 390 | $str .= $translator->t('Show attributes'); |
| 391 | 391 | $str .= '</a>'; |
| 392 | 392 | $str .= '</div>'; |