Skip to content

Commit

Permalink
fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Klapaudius committed Jan 14, 2022
1 parent 571a174 commit b4e6182
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions Model/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class Client implements ClientInterface
protected $id;

/**
* @var string
* @var string|null
*/
protected string $randomId;
protected ?string $randomId = null;

/**
* @var string
* @var string|null
*/
protected string $secret;
protected ?string $secret = null;

/**
* @var array
Expand Down Expand Up @@ -59,15 +59,15 @@ public function getId()
/**
* {@inheritdoc}
*/
public function setRandomId($random)
public function setRandomId( string $random )
{
$this->randomId = $random;
}

/**
* {@inheritdoc}
*/
public function getRandomId(): string
public function getRandomId(): ?string
{
return $this->randomId;
}
Expand All @@ -91,7 +91,7 @@ public function setSecret($secret)
/**
* {@inheritdoc}
*/
public function getSecret(): string
public function getSecret(): ?string
{
return $this->secret;
}
Expand Down
8 changes: 4 additions & 4 deletions Security/Authentication/Token/OAuthToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ class OAuthToken extends AbstractToken
/**
* @var string
*/
protected $token;
protected string $token;

public function setToken($token)
public function setToken(string $token)
{
$this->token = $token;
}

public function getToken()
public function getToken(): string
{
return $this->token;
}

public function getCredentials()
public function getCredentials(): string
{
return $this->token;
}
Expand Down
8 changes: 4 additions & 4 deletions Storage/OAuthStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ class OAuthStorage implements IOAuth2RefreshTokens, IOAuth2GrantUser, IOAuth2Gra
protected AuthCodeManagerInterface $authCodeManager;

/**
* @var UserProviderInterface
* @var UserProviderInterface|null
*/
protected UserProviderInterface $userProvider;
protected ?UserProviderInterface $userProvider;

/**
* @var PasswordHasherFactoryInterface
* @var PasswordHasherFactoryInterface|null
*/
protected PasswordHasherFactoryInterface $passwordHasherFactory;
protected ?PasswordHasherFactoryInterface $passwordHasherFactory;

/**
* @var array [uri] => GrantExtensionInterface
Expand Down

0 comments on commit b4e6182

Please sign in to comment.