Code smell.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user