Passed
Push — master ( 22ef39...b9d93e )
by Tim
02:17
created
lib/Store.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
         }
130 130
 
131 131
         if (!is_array($config)) {
132
-            throw new \Exception('Invalid configuration for consent store option: ' . var_export($config, true));
132
+            throw new \Exception('Invalid configuration for consent store option: '.var_export($config, true));
133 133
         }
134 134
 
135 135
         if (!array_key_exists(0, $config)) {
Please login to merge, or discard this patch.
www/getconsent.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
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
 
@@ -228,38 +228,38 @@  discard block
 block discarded – undo
228 228
 
229 229
     $alternate = ['odd', 'even'];
230 230
     $i = 0;
231
-    $summary = 'summary="' . $translator->t('{consent:consent:table_summary}') . '"';
231
+    $summary = 'summary="'.$translator->t('{consent:consent:table_summary}').'"';
232 232
 
233 233
     if (strlen($nameParent) > 0) {
234
-        $parentStr = strtolower($nameParent) . '_';
235
-        $str = '<table class="attributes" ' . $summary . '>';
234
+        $parentStr = strtolower($nameParent).'_';
235
+        $str = '<table class="attributes" '.$summary.'>';
236 236
     } else {
237 237
         $parentStr = '';
238
-        $str = '<table id="table_with_attributes" class="attributes" ' . $summary . '>';
239
-        $str .= "\n" . '<caption>' . $translator->t('{consent:consent:table_caption}') . '</caption>';
238
+        $str = '<table id="table_with_attributes" class="attributes" '.$summary.'>';
239
+        $str .= "\n".'<caption>'.$translator->t('{consent:consent:table_caption}').'</caption>';
240 240
     }
241 241
 
242 242
     foreach ($attributes as $name => $value) {
243 243
         $nameraw = $name;
244
-        $name = $translator->getAttributeTranslation($parentStr . $nameraw);
244
+        $name = $translator->getAttributeTranslation($parentStr.$nameraw);
245 245
 
246 246
         if (preg_match('/^child_/', $nameraw)) {
247 247
             // insert child table
248 248
             $parentName = preg_replace('/^child_/', '', $nameraw);
249 249
             foreach ($value as $child) {
250
-                $str .= "\n" . '<tr class="odd"><td class="td_odd">' .
251
-                    present_attributes($t, $child, $parentName) . '</td></tr>';
250
+                $str .= "\n".'<tr class="odd"><td class="td_odd">'.
251
+                    present_attributes($t, $child, $parentName).'</td></tr>';
252 252
             }
253 253
         } else {
254 254
             // insert values directly
255 255
 
256
-            $str .= "\n" . '<tr class="' . $alternate[($i++ % 2)] .
257
-                '"><td><span class="attrname">' . htmlspecialchars($name) . '</span></td>';
256
+            $str .= "\n".'<tr class="'.$alternate[($i++ % 2)].
257
+                '"><td><span class="attrname">'.htmlspecialchars($name).'</span></td>';
258 258
 
259 259
             $isHidden = in_array($nameraw, $t->data['hiddenAttributes'], true);
260 260
             if ($isHidden) {
261 261
                 $hiddenId = \SimpleSAML\Utils\Random::generateID();
262
-                $str .= '<td><span class="attrvalue hidden" id="hidden_' . $hiddenId . '">';
262
+                $str .= '<td><span class="attrvalue hidden" id="hidden_'.$hiddenId.'">';
263 263
             } else {
264 264
                 $hiddenId = '';
265 265
                 $str .= '<td><span class="attrvalue">';
@@ -270,18 +270,18 @@  discard block
 block discarded – undo
270 270
                 $str .= '<ul>';
271 271
                 foreach ($value as $listitem) {
272 272
                     if ($nameraw === 'jpegPhoto') {
273
-                        $str .= '<li><img src="data:image/jpeg;base64,' .
274
-                            htmlspecialchars($listitem) . '" alt="User photo" /></li>';
273
+                        $str .= '<li><img src="data:image/jpeg;base64,'.
274
+                            htmlspecialchars($listitem).'" alt="User photo" /></li>';
275 275
                     } else {
276
-                        $str .= '<li>' . htmlspecialchars($listitem) . '</li>';
276
+                        $str .= '<li>'.htmlspecialchars($listitem).'</li>';
277 277
                     }
278 278
                 }
279 279
                 $str .= '</ul>';
280 280
             } elseif (isset($value[0])) {
281 281
                 // we hawe only one value
282 282
                 if ($nameraw === 'jpegPhoto') {
283
-                    $str .= '<img src="data:image/jpeg;base64,' .
284
-                        htmlspecialchars($value[0]) . '" alt="User photo" />';
283
+                    $str .= '<img src="data:image/jpeg;base64,'.
284
+                        htmlspecialchars($value[0]).'" alt="User photo" />';
285 285
                 } else {
286 286
                     $str .= htmlspecialchars($value[0]);
287 287
                 }
@@ -289,10 +289,10 @@  discard block
 block discarded – undo
289 289
             $str .= '</span>';
290 290
 
291 291
             if ($isHidden) {
292
-                $str .= '<div class="attrvalue consent_showattribute" id="visible_' . $hiddenId . '">';
292
+                $str .= '<div class="attrvalue consent_showattribute" id="visible_'.$hiddenId.'">';
293 293
                 $str .= '... ';
294
-                $str .= '<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_' . $hiddenId;
295
-                $str .= '\'); SimpleSAML_hide(\'visible_' . $hiddenId . '\');">';
294
+                $str .= '<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_'.$hiddenId;
295
+                $str .= '\'); SimpleSAML_hide(\'visible_'.$hiddenId.'\');">';
296 296
                 $str .= $translator->t('{consent:consent:show_attribute}');
297 297
                 $str .= '</a>';
298 298
                 $str .= '</div>';
Please login to merge, or discard this patch.
lib/Consent/Store/Database.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
     public function hasConsent(string $userId, string $destinationId, string $attributeSet): bool
171 171
     {
172 172
         $st = $this->execute(
173
-            'UPDATE ' . $this->table . ' ' .
174
-            'SET usage_date = ' . $this->dateTime . ' ' .
173
+            'UPDATE '.$this->table.' '.
174
+            'SET usage_date = '.$this->dateTime.' '.
175 175
             'WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?',
176 176
             [$userId, $destinationId, $attributeSet]
177 177
         );
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
     {
208 208
         // Check for old consent (with different attribute set)
209 209
         $st = $this->execute(
210
-            'UPDATE ' . $this->table . ' ' .
211
-            'SET consent_date = ' . $this->dateTime . ', usage_date = ' . $this->dateTime . ', attribute = ? ' .
210
+            'UPDATE '.$this->table.' '.
211
+            'SET consent_date = '.$this->dateTime.', usage_date = '.$this->dateTime.', attribute = ? '.
212 212
             'WHERE hashed_user_id = ? AND service_id = ?',
213 213
             [$attributeSet, $userId, $destinationId]
214 214
         );
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
 
226 226
         // Add new consent
227 227
         $st = $this->execute(
228
-            'INSERT INTO ' . $this->table . ' (' . 'consent_date, usage_date, hashed_user_id, service_id, attribute' .
229
-            ') ' . 'VALUES (' . $this->dateTime . ', ' . $this->dateTime . ', ?, ?, ?)',
228
+            'INSERT INTO '.$this->table.' ('.'consent_date, usage_date, hashed_user_id, service_id, attribute'.
229
+            ') '.'VALUES ('.$this->dateTime.', '.$this->dateTime.', ?, ?, ?)',
230 230
             [$userId, $destinationId, $attributeSet]
231 231
         );
232 232
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     public function deleteConsent(string $userId, string $destinationId): int
251 251
     {
252 252
         $st = $this->execute(
253
-            'DELETE FROM ' . $this->table . ' WHERE hashed_user_id = ? AND service_id = ?;',
253
+            'DELETE FROM '.$this->table.' WHERE hashed_user_id = ? AND service_id = ?;',
254 254
             [$userId, $destinationId]
255 255
         );
256 256
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     public function deleteAllConsents(string $userId): int
279 279
     {
280 280
         $st = $this->execute(
281
-            'DELETE FROM ' . $this->table . ' WHERE hashed_user_id = ?',
281
+            'DELETE FROM '.$this->table.' WHERE hashed_user_id = ?',
282 282
             [$userId]
283 283
         );
284 284
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         }
288 288
 
289 289
         if ($st->rowCount() > 0) {
290
-            Logger::debug('consent:Database - Deleted (' . $st->rowCount() . ') consent(s) . ');
290
+            Logger::debug('consent:Database - Deleted ('.$st->rowCount().') consent(s) . ');
291 291
             return $st->rowCount();
292 292
         }
293 293
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         $ret = [];
311 311
 
312 312
         $st = $this->execute(
313
-            'SELECT service_id, attribute, consent_date, usage_date FROM ' . $this->table .
313
+            'SELECT service_id, attribute, consent_date, usage_date FROM '.$this->table.
314 314
             ' WHERE hashed_user_id = ?',
315 315
             [$userId]
316 316
         );
@@ -349,16 +349,16 @@  discard block
 block discarded – undo
349 349
         $st = $db->prepare($statement);
350 350
         if ($st === false) {
351 351
             Logger::error(
352
-                'consent:Database - Error preparing statement \'' .
353
-                $statement . '\': ' . self::formatError($db->errorInfo())
352
+                'consent:Database - Error preparing statement \''.
353
+                $statement.'\': '.self::formatError($db->errorInfo())
354 354
             );
355 355
             return false;
356 356
         }
357 357
 
358 358
         if ($st->execute($parameters) !== true) {
359 359
             Logger::error(
360
-                'consent:Database - Error executing statement \'' .
361
-                $statement . '\': ' . self::formatError($st->errorInfo())
360
+                'consent:Database - Error executing statement \''.
361
+                $statement.'\': '.self::formatError($st->errorInfo())
362 362
             );
363 363
             return false;
364 364
         }
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         $ret = [];
383 383
 
384 384
         // Get total number of consents
385
-        $st = $this->execute('SELECT COUNT(*) AS no FROM ' . $this->table, []);
385
+        $st = $this->execute('SELECT COUNT(*) AS no FROM '.$this->table, []);
386 386
 
387 387
         if ($st === false) {
388 388
             return [];
@@ -394,8 +394,8 @@  discard block
 block discarded – undo
394 394
 
395 395
         // Get total number of users that has given consent
396 396
         $st = $this->execute(
397
-            'SELECT COUNT(*) AS no ' .
398
-            'FROM (SELECT DISTINCT hashed_user_id FROM ' . $this->table . ' ) AS foo',
397
+            'SELECT COUNT(*) AS no '.
398
+            'FROM (SELECT DISTINCT hashed_user_id FROM '.$this->table.' ) AS foo',
399 399
             []
400 400
         );
401 401
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 
410 410
         // Get total number of services that has been given consent to
411 411
         $st = $this->execute(
412
-            'SELECT COUNT(*) AS no FROM (SELECT DISTINCT service_id FROM ' . $this->table . ') AS foo',
412
+            'SELECT COUNT(*) AS no FROM (SELECT DISTINCT service_id FROM '.$this->table.') AS foo',
413 413
             []
414 414
         );
415 415
 
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
     {
466 466
         Assert::greaterThanEq(count($error), 3);
467 467
 
468
-        return $error[0] . ' - ' . $error[2] . ' (' . $error[1] . ')';
468
+        return $error[0].' - '.$error[2].' ('.$error[1].')';
469 469
     }
470 470
 
471 471
 
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
     public function selftest(): bool
478 478
     {
479 479
         $st = $this->execute(
480
-            'SELECT * FROM ' . $this->table . ' WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?',
480
+            'SELECT * FROM '.$this->table.' WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?',
481 481
             ['test', 'test', 'test']
482 482
         );
483 483
 
Please login to merge, or discard this patch.
lib/Consent/Store/Cookie.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,19 +43,19 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $cookieName = self::getCookieName($userId, $destinationId);
45 45
 
46
-        $data = $userId . ':' . $attributeSet . ':' . $destinationId;
46
+        $data = $userId.':'.$attributeSet.':'.$destinationId;
47 47
 
48
-        Logger::debug('Consent cookie - Get [' . $data . ']');
48
+        Logger::debug('Consent cookie - Get ['.$data.']');
49 49
 
50 50
         if (!array_key_exists($cookieName, $_COOKIE)) {
51 51
             Logger::debug(
52
-                'Consent cookie - no cookie with name \'' . $cookieName . '\'.'
52
+                'Consent cookie - no cookie with name \''.$cookieName.'\'.'
53 53
             );
54 54
             return false;
55 55
         }
56 56
         if (!is_string($_COOKIE[$cookieName])) {
57 57
             Logger::warning(
58
-                'Value of consent cookie wasn\'t a string. Was: ' .
58
+                'Value of consent cookie wasn\'t a string. Was: '.
59 59
                 var_export($_COOKIE[$cookieName], true)
60 60
             );
61 61
             return false;
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
     public function saveConsent(string $userId, string $destinationId, string $attributeSet): bool
94 94
     {
95 95
         $name = self::getCookieName($userId, $destinationId);
96
-        $value = $userId . ':' . $attributeSet . ':' . $destinationId;
96
+        $value = $userId.':'.$attributeSet.':'.$destinationId;
97 97
 
98
-        Logger::debug('Consent cookie - Set [' . $value . ']');
98
+        Logger::debug('Consent cookie - Set ['.$value.']');
99 99
 
100 100
         $value = self::sign($value);
101 101
         return $this->setConsentCookie($name, $value);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             $tmp = explode(':', $value, 3);
166 166
             if (count($tmp) !== 3) {
167 167
                 Logger::warning(
168
-                    'Consent cookie with invalid value: ' . $value
168
+                    'Consent cookie with invalid value: '.$value
169 169
                 );
170 170
                 continue;
171 171
             }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     {
197 197
         $secretSalt = \SimpleSAML\Utils\Config::getSecretSalt();
198 198
 
199
-        return sha1($secretSalt . $data . $secretSalt) . ':' . $data;
199
+        return sha1($secretSalt.$data.$secretSalt).':'.$data;
200 200
     }
201 201
 
202 202
 
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
      */
241 241
     private static function getCookieName(string $userId, string $destinationId): string
242 242
     {
243
-        return '\SimpleSAML\Module\consent:' . sha1($userId . ':' . $destinationId);
243
+        return '\SimpleSAML\Module\consent:'.sha1($userId.':'.$destinationId);
244 244
     }
245 245
 
246 246
 
Please login to merge, or discard this patch.
lib/Auth/Process/Consent.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
         if (array_key_exists('includeValues', $config)) {
87 87
             if (!is_bool($config['includeValues'])) {
88 88
                 throw new \SimpleSAML\Error\Exception(
89
-                    'Consent: includeValues must be boolean. ' .
90
-                    var_export($config['includeValues'], true) . ' given.'
89
+                    'Consent: includeValues must be boolean. '.
90
+                    var_export($config['includeValues'], true).' given.'
91 91
                 );
92 92
             }
93 93
             $this->includeValues = $config['includeValues'];
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
         if (array_key_exists('checked', $config)) {
97 97
             if (!is_bool($config['checked'])) {
98 98
                 throw new \SimpleSAML\Error\Exception(
99
-                    'Consent: checked must be boolean. ' .
100
-                    var_export($config['checked'], true) . ' given.'
99
+                    'Consent: checked must be boolean. '.
100
+                    var_export($config['checked'], true).' given.'
101 101
                 );
102 102
             }
103 103
             $this->checked = $config['checked'];
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         if (array_key_exists('focus', $config)) {
107 107
             if (!in_array($config['focus'], ['yes', 'no'], true)) {
108 108
                 throw new \SimpleSAML\Error\Exception(
109
-                    'Consent: focus must be a string with values `yes` or `no`. ' .
110
-                    var_export($config['focus'], true) . ' given.'
109
+                    'Consent: focus must be a string with values `yes` or `no`. '.
110
+                    var_export($config['focus'], true).' given.'
111 111
                 );
112 112
             }
113 113
             $this->focus = $config['focus'];
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
         if (array_key_exists('hiddenAttributes', $config)) {
117 117
             if (!is_array($config['hiddenAttributes'])) {
118 118
                 throw new \SimpleSAML\Error\Exception(
119
-                    'Consent: hiddenAttributes must be an array. ' .
120
-                    var_export($config['hiddenAttributes'], true) . ' given.'
119
+                    'Consent: hiddenAttributes must be an array. '.
120
+                    var_export($config['hiddenAttributes'], true).' given.'
121 121
                 );
122 122
             }
123 123
             $this->hiddenAttributes = $config['hiddenAttributes'];
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
         if (array_key_exists('attributes.exclude', $config)) {
127 127
             if (!is_array($config['attributes.exclude'])) {
128 128
                 throw new \SimpleSAML\Error\Exception(
129
-                    'Consent: attributes.exclude must be an array. ' .
130
-                    var_export($config['attributes.exclude'], true) . ' given.'
129
+                    'Consent: attributes.exclude must be an array. '.
130
+                    var_export($config['attributes.exclude'], true).' given.'
131 131
                 );
132 132
             }
133 133
             $this->noconsentattributes = $config['attributes.exclude'];
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
             Logger::warning("The 'noconsentattributes' option has been deprecated in favour of 'attributes.exclude'.");
136 136
             if (!is_array($config['noconsentattributes'])) {
137 137
                 throw new \SimpleSAML\Error\Exception(
138
-                    'Consent: noconsentattributes must be an array. ' .
139
-                    var_export($config['noconsentattributes'], true) . ' given.'
138
+                    'Consent: noconsentattributes must be an array. '.
139
+                    var_export($config['noconsentattributes'], true).' given.'
140 140
                 );
141 141
             }
142 142
             $this->noconsentattributes = $config['noconsentattributes'];
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 $this->store = \SimpleSAML\Module\consent\Store::parseStoreConfig($config['store']);
148 148
             } catch (\Exception $e) {
149 149
                 Logger::error(
150
-                    'Consent: Could not create consent storage: ' .
150
+                    'Consent: Could not create consent storage: '.
151 151
                     $e->getMessage()
152 152
                 );
153 153
             }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             isset($state['Source']['consent.disable']) &&
265 265
             self::checkDisable($state['Source']['consent.disable'], $spEntityId)
266 266
         ) {
267
-            Logger::debug('Consent: Consent disabled for entity ' . $spEntityId . ' with IdP ' . $idpEntityId);
267
+            Logger::debug('Consent: Consent disabled for entity '.$spEntityId.' with IdP '.$idpEntityId);
268 268
             Stats::log('consent:disabled', $statsData);
269 269
             return;
270 270
         }
@@ -272,14 +272,14 @@  discard block
 block discarded – undo
272 272
             isset($state['Destination']['consent.disable']) &&
273 273
             self::checkDisable($state['Destination']['consent.disable'], $idpEntityId)
274 274
         ) {
275
-            Logger::debug('Consent: Consent disabled for entity ' . $spEntityId . ' with IdP ' . $idpEntityId);
275
+            Logger::debug('Consent: Consent disabled for entity '.$spEntityId.' with IdP '.$idpEntityId);
276 276
             Stats::log('consent:disabled', $statsData);
277 277
             return;
278 278
         }
279 279
 
280 280
         if ($this->store !== null) {
281
-            $source = $state['Source']['metadata-set'] . '|' . $idpEntityId;
282
-            $destination = $state['Destination']['metadata-set'] . '|' . $spEntityId;
281
+            $source = $state['Source']['metadata-set'].'|'.$idpEntityId;
282
+            $destination = $state['Destination']['metadata-set'].'|'.$spEntityId;
283 283
             $attributes = $state['Attributes'];
284 284
 
285 285
             // Remove attributes that do not require consent
@@ -289,16 +289,16 @@  discard block
 block discarded – undo
289 289
                 }
290 290
             }
291 291
 
292
-            Logger::debug('Consent: userid: ' . $state['UserID']);
293
-            Logger::debug('Consent: source: ' . $source);
294
-            Logger::debug('Consent: destination: ' . $destination);
292
+            Logger::debug('Consent: userid: '.$state['UserID']);
293
+            Logger::debug('Consent: source: '.$source);
294
+            Logger::debug('Consent: destination: '.$destination);
295 295
 
296 296
             $userId = self::getHashedUserID($state['UserID'], $source);
297 297
             $targetedId = self::getTargetedID($state['UserID'], $source, $destination);
298 298
             $attributeSet = self::getAttributeHash($attributes, $this->includeValues);
299 299
 
300 300
             Logger::debug(
301
-                'Consent: hasConsent() [' . $userId . '|' . $targetedId . '|' . $attributeSet . ']'
301
+                'Consent: hasConsent() ['.$userId.'|'.$targetedId.'|'.$attributeSet.']'
302 302
             );
303 303
 
304 304
             try {
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
                 $state['consent:store.destination'] = $targetedId;
318 318
                 $state['consent:store.attributeSet'] = $attributeSet;
319 319
             } catch (\Exception $e) {
320
-                Logger::error('Consent: Error reading from storage: ' . $e->getMessage());
320
+                Logger::error('Consent: Error reading from storage: '.$e->getMessage());
321 321
                 Logger::stats('Consent failed');
322 322
                 Stats::log('consent:failed', $statsData);
323 323
             }
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public static function getHashedUserID(string $userid, string $source): string
360 360
     {
361
-        return hash('sha1', $userid . '|' . Utils\Config::getSecretSalt() . '|' . $source);
361
+        return hash('sha1', $userid.'|'.Utils\Config::getSecretSalt().'|'.$source);
362 362
     }
363 363
 
364 364
 
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
      */
374 374
     public static function getTargetedID(string $userid, string $source, string $destination): string
375 375
     {
376
-        return hash('sha1', $userid . '|' . Utils\Config::getSecretSalt() . '|' . $source . '|' . $destination);
376
+        return hash('sha1', $userid.'|'.Utils\Config::getSecretSalt().'|'.$source.'|'.$destination);
377 377
     }
378 378
 
379 379
 
Please login to merge, or discard this patch.