Skip to content

Commit 514e6b5

Browse files
committed
:octocat: return static instead of self or <interface>
1 parent 56b105e commit 514e6b5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Authenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(
5858
* Please note that this will reset the secret phrase stored with the authenticator instance
5959
* if a different mode than the current is given.
6060
*/
61-
public function setOptions(SettingsContainerInterface|AuthenticatorOptions $options):self{
61+
public function setOptions(SettingsContainerInterface|AuthenticatorOptions $options):static{
6262
$this->options = $options;
6363

6464
// invoke a new authenticator interface if necessary
@@ -77,7 +77,7 @@ public function setOptions(SettingsContainerInterface|AuthenticatorOptions $opti
7777
*
7878
* @codeCoverageIgnore
7979
*/
80-
public function setSecret(#[SensitiveParameter] string $encodedSecret):self{
80+
public function setSecret(#[SensitiveParameter] string $encodedSecret):static{
8181
$this->authenticator->setSecret($encodedSecret);
8282

8383
return $this;

src/Authenticators/AuthenticatorAbstract.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(SettingsContainerInterface|AuthenticatorOptions $opt
4343
/**
4444
* @inheritDoc
4545
*/
46-
public function setOptions(SettingsContainerInterface $options):AuthenticatorInterface{
46+
public function setOptions(SettingsContainerInterface $options):static{
4747
$this->options = $options;
4848

4949
return $this;
@@ -52,7 +52,7 @@ public function setOptions(SettingsContainerInterface $options):AuthenticatorInt
5252
/**
5353
* @inheritDoc
5454
*/
55-
public function setSecret(#[SensitiveParameter] string $encodedSecret):AuthenticatorInterface{
55+
public function setSecret(#[SensitiveParameter] string $encodedSecret):static{
5656
$this->secret = Base32::decode($this->checkEncodedSecret($encodedSecret));
5757

5858
return $this;

src/Authenticators/AuthenticatorInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ interface AuthenticatorInterface{
4242
/**
4343
* Sets the options
4444
*/
45-
public function setOptions(SettingsContainerInterface $options):AuthenticatorInterface;
45+
public function setOptions(SettingsContainerInterface $options):static;
4646

4747
/**
4848
* Sets a secret phrase from an encoded representation
4949
*
5050
* @throws \RuntimeException
5151
*/
52-
public function setSecret(#[SensitiveParameter] string $encodedSecret):AuthenticatorInterface;
52+
public function setSecret(#[SensitiveParameter] string $encodedSecret):static;
5353

5454
/**
5555
* Returns an encoded representation of the current secret phrase

src/Authenticators/SteamGuard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ final class SteamGuard extends TOTP{
4646
/**
4747
* @inheritDoc
4848
*/
49-
public function setSecret(#[SensitiveParameter] string $encodedSecret):AuthenticatorInterface{
49+
public function setSecret(#[SensitiveParameter] string $encodedSecret):static{
5050
$this->secret = Base64::decode($this->checkEncodedSecret($encodedSecret));
5151

5252
return $this;

0 commit comments

Comments
 (0)