Code smell.

This commit is contained in:
Ivor Barhansky
2022-12-17 01:20:43 +02:00
parent b1f578f4b0
commit 0398425205
45 changed files with 875 additions and 851 deletions
+5 -4
View File
@@ -9,11 +9,12 @@ class UserPrivateInfo
/** Блок информации для модераторов. */
public static function get(User $user)
{
$log = '';
$userLogs = GameLogs::getUserLogs($user->getId());
$log = null;
while ($userLogRow = $userLogs->fetchArray(SQLITE3_ASSOC)) {
$log .= sprintf('<code>%s</code><br>', date('d.m.Y H:i ', strtotime($userLogRow['date'])) . $userLogRow['text']);
foreach ($userLogs as $row) {
$log .= sprintf('<code>%s</code><br>', date('d.m.Y H:i ', strtotime($row['date'])) . $row['text']);
}
$data = [
'%email' => $user->profile()->getEmail(),
'%bday' => date('d.m.Y', strtotime($user->profile()->getBorndate())),
@@ -33,4 +34,4 @@ class UserPrivateInfo
</div><!-- secret-info -->';
return str_replace(array_keys($data), array_values($data), $string);
}
}
}