2021-08-25 01:44:36 +00:00
|
|
|
<?php
|
|
|
|
# Date: 15.03.2021 (21:53)
|
|
|
|
|
|
|
|
namespace Battles;
|
|
|
|
|
2022-01-26 23:15:33 +00:00
|
|
|
use Battles\Database\Db;
|
2021-08-25 01:44:36 +00:00
|
|
|
|
|
|
|
class Check
|
|
|
|
{
|
|
|
|
private User $user;
|
2022-01-26 23:15:33 +00:00
|
|
|
private Db $db;
|
2021-08-25 01:44:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check constructor.
|
|
|
|
*
|
|
|
|
* @param User $user
|
|
|
|
*/
|
2022-01-26 23:15:33 +00:00
|
|
|
public function __construct(User $user, Db $db)
|
2021-08-25 01:44:36 +00:00
|
|
|
{
|
|
|
|
$this->user = $user;
|
|
|
|
$this->db = $db;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function Effects()
|
|
|
|
{
|
|
|
|
return $this->db->execute('delete from users_effects where remaining_time <= ?', strtotime('now'));
|
|
|
|
}
|
|
|
|
}
|