Skip to content

Commit

Permalink
fix: CS (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentchalamon committed May 23, 2024
1 parent a39aa82 commit 84dd8d4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Manager/ForgotPasswordManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
$this->providerChain = $providerChain;
}

public function resetPassword($propertyName, $value, ProviderInterface $provider = null): void
public function resetPassword($propertyName, $value, ?ProviderInterface $provider = null): void
{
/* @var null|Provider $provider */
if (!$provider) {
Expand Down Expand Up @@ -88,7 +88,7 @@ public function resetPassword($propertyName, $value, ProviderInterface $provider
*
* @return bool
*/
public function updatePassword(AbstractPasswordToken $passwordToken, $password, ProviderInterface $provider = null)
public function updatePassword(AbstractPasswordToken $passwordToken, $password, ?ProviderInterface $provider = null)
{
/* @var null|Provider $provider */
if (!$provider) {
Expand Down
6 changes: 3 additions & 3 deletions src/Manager/PasswordTokenManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(ProviderChainInterface $providerChain)
/**
* @return AbstractPasswordToken
*/
public function createPasswordToken($user, \DateTime $expiresAt = null, ProviderInterface $provider = null)
public function createPasswordToken($user, ?\DateTime $expiresAt = null, ?ProviderInterface $provider = null)
{
/* @var Provider $provider */
if (!$provider) {
Expand Down Expand Up @@ -76,7 +76,7 @@ public function createPasswordToken($user, \DateTime $expiresAt = null, Provider
*
* @return AbstractPasswordToken
*/
public function findOneByToken($token, ProviderInterface $provider = null)
public function findOneByToken($token, ?ProviderInterface $provider = null)
{
/* @var null|Provider $provider */
if (!$provider) {
Expand All @@ -90,7 +90,7 @@ public function findOneByToken($token, ProviderInterface $provider = null)
/**
* @return AbstractPasswordToken
*/
public function findOneByUser($user, ProviderInterface $provider = null)
public function findOneByUser($user, ?ProviderInterface $provider = null)
{
/* @var null|Provider $provider */
if (!$provider) {
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/ProviderChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(iterable $providers)
/**
* Returns a provider by its name, without name the default provider is returned.
*/
public function get(string $name = null): ProviderInterface
public function get(?string $name = null): ProviderInterface
{
if (null === $name) {
return $this->getDefault();
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/ProviderChainInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

interface ProviderChainInterface
{
public function get(string $name = null): ProviderInterface;
public function get(?string $name = null): ProviderInterface;

/**
* @return array<string, ProviderInterface>
Expand Down

0 comments on commit 84dd8d4

Please sign in to comment.