Фиксы после инспекции кода новым инспектором в PHPStorm

В некоторых формах отключена валидация при сохранении модели аккаунта
This commit is contained in:
ErickSkrauch
2016-11-01 19:36:39 +03:00
parent 7ec87e0602
commit 3b56f3c418
11 changed files with 17 additions and 18 deletions

View File

@@ -9,7 +9,7 @@ class UserFriendlyRandomKey {
$numChars = strlen($chars);
$key = '';
for ($i = 0; $i < $length; $i++) {
$key .= substr($chars, rand(1, $numChars) - 1, 1);
$key .= $chars[random_int(0, $numChars - 1)];
}
return $key;

View File

@@ -54,7 +54,7 @@ class AuthCodeStorage extends AbstractStorage implements AuthCodeInterface {
* @inheritdoc
*/
public function getScopes(OriginalAuthCodeEntity $token) {
$result = (new Set($this->dataTable, $token->getId(), 'scopes'));
$result = new Set($this->dataTable, $token->getId(), 'scopes');
$response = [];
foreach ($result as $scope) {
// TODO: нужно проверить все выданные скоупы на их существование

View File

@@ -2,10 +2,9 @@
namespace common\components\oauth\Util\KeyAlgorithm;
use League\OAuth2\Server\Util\KeyAlgorithm\DefaultAlgorithm;
use League\OAuth2\Server\Util\KeyAlgorithm\KeyAlgorithmInterface;
use Ramsey\Uuid\Uuid;
class UuidAlgorithm extends DefaultAlgorithm implements KeyAlgorithmInterface {
class UuidAlgorithm extends DefaultAlgorithm {
/**
* @inheritdoc