Skip to content

Commit

Permalink
Add rector changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jul 11, 2023
1 parent 25999fa commit 3607c94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class User extends \yii\base\BaseObject implements \yii\web\IdentityInterface
public $authKey;
public $accessToken;

private static $users = [
private static array $users = [
'100' => [
'id' => '100',
'username' => 'admin',
Expand Down Expand Up @@ -59,7 +59,7 @@ public static function findIdentityByAccessToken($token, $type = null)
public static function findByUsername($username)
{
foreach (self::$users as $user) {
if (strcasecmp($user['username'], $username) === 0) {
if (strcasecmp((string) $user['username'], $username) === 0) {
return new static($user);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/models/LoginFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class LoginFormTest extends \Codeception\Test\Unit
{
private $model;
private \app\models\LoginForm|null $model = null;

protected function _after()
{
Expand Down

0 comments on commit 3607c94

Please sign in to comment.