mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Фиксы после инспекции кода новым инспектором в PHPStorm
В некоторых формах отключена валидация при сохранении модели аккаунта
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
namespace common\models;
|
||||
|
||||
use Yii;
|
||||
use yii\db\ActiveRecord;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
namespace common\models;
|
||||
|
||||
use common\components\redis\Set;
|
||||
use Yii;
|
||||
use yii\db\ActiveRecord;
|
||||
|
||||
/**
|
||||
@@ -38,7 +37,7 @@ class OauthSession extends ActiveRecord {
|
||||
}
|
||||
|
||||
public function getScopes() {
|
||||
return new Set($this->getDb()->getSchema()->getRawTableName($this->tableName()), $this->id, 'scopes');
|
||||
return new Set(static::getDb()->getSchema()->getRawTableName(static::tableName()), $this->id, 'scopes');
|
||||
}
|
||||
|
||||
public function beforeDelete() {
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
namespace common\models;
|
||||
|
||||
use common\components\SkinSystem\Api as SkinSystemApi;
|
||||
use DateInterval;
|
||||
use DateTime;
|
||||
|
||||
class Textures {
|
||||
|
||||
@@ -38,7 +40,7 @@ class Textures {
|
||||
|
||||
public function getTexturesValue($encrypted = true) {
|
||||
$array = [
|
||||
'timestamp' => time() + 60 * 60 * 24 * 2,
|
||||
'timestamp' => (new DateTime())->add(new DateInterval('P2D'))->getTimestamp(),
|
||||
'profileId' => str_replace('-', '', $this->account->uuid),
|
||||
'profileName' => $this->account->username,
|
||||
'textures' => $this->getTextures(),
|
||||
@@ -51,7 +53,7 @@ class Textures {
|
||||
if (!$encrypted) {
|
||||
return $array;
|
||||
} else {
|
||||
return $this->encrypt($array);
|
||||
return static::encrypt($array);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user