Fixed phpstan detections.
This commit is contained in:
parent
461ffbf73b
commit
20b309563e
4 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
namespace Misuzu\Auth;
|
||||
|
||||
use Index\TimeSpan;
|
||||
use Index\Data\DbStatementCache;
|
||||
use Index\Data\IDbConnection;
|
||||
use Index\Net\IPAddress;
|
||||
|
|
|
@ -44,7 +44,7 @@ class RecoveryTokenInfo {
|
|||
return $this->created + self::LIFETIME;
|
||||
}
|
||||
|
||||
public function getExpiresAt(): bool {
|
||||
public function getExpiresAt(): DateTime {
|
||||
return DateTime::fromUnixTimeSeconds($this->created + self::LIFETIME);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class Roles {
|
|||
$query .= ' WHERE role_id IN (SELECT role_id FROM msz_users_roles WHERE user_id = ?)';
|
||||
}
|
||||
if($hasHidden)
|
||||
$query .= sprintf(' %s role_hidden %s 0', ++$args > 0 ? 'AND' : 'WHERE', $hidden ? '=' : '<>');
|
||||
$query .= sprintf(' %s role_hidden %s 0', ++$args > 1 ? 'AND' : 'WHERE', $hidden ? '=' : '<>');
|
||||
|
||||
$args = 0;
|
||||
$stmt = $this->cache->get($query);
|
||||
|
|
|
@ -7,11 +7,11 @@ use Index\Data\DbTools;
|
|||
use Index\Data\IDbConnection;
|
||||
|
||||
class Users {
|
||||
private IDbConnection $dbConn;
|
||||
//private IDbConnection $dbConn;
|
||||
private DbStatementCache $cache;
|
||||
|
||||
public function __construct(IDbConnection $dbConn) {
|
||||
$this->dbConn = $dbConn;
|
||||
//$this->dbConn = $dbConn;
|
||||
$this->cache = new DbStatementCache($dbConn);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue