@@ -39,7 +39,7 @@ class Authenticator{
39
39
/**
40
40
* Authenticator constructor
41
41
*/
42
- public function __construct (SettingsContainerInterface $ options = null , string $ secret = null ){
42
+ public function __construct (? SettingsContainerInterface $ options = null , ? string $ secret = null ){
43
43
// phpcs:ignore
44
44
$ this ->setOptions ($ options ?? new AuthenticatorOptions );
45
45
@@ -95,7 +95,7 @@ public function getSecret():string{
95
95
*
96
96
* @codeCoverageIgnore
97
97
*/
98
- public function createSecret (int $ length = null ):string {
98
+ public function createSecret (? int $ length = null ):string {
99
99
return $ this ->authenticator ->createSecret ($ length );
100
100
}
101
101
@@ -108,7 +108,7 @@ public function createSecret(int $length = null):string{
108
108
*
109
109
* @codeCoverageIgnore
110
110
*/
111
- public function code (int $ data = null ):string {
111
+ public function code (? int $ data = null ):string {
112
112
return $ this ->authenticator ->code ($ data );
113
113
}
114
114
@@ -121,7 +121,7 @@ public function code(int $data = null):string{
121
121
*
122
122
* @codeCoverageIgnore
123
123
*/
124
- public function verify (string $ otp , int $ data = null ):bool {
124
+ public function verify (string $ otp , ? int $ data = null ):bool {
125
125
return $ this ->authenticator ->verify ($ otp , $ data );
126
126
}
127
127
@@ -132,7 +132,7 @@ public function verify(string $otp, int $data = null):bool{
132
132
*
133
133
* @throws \InvalidArgumentException
134
134
*/
135
- public function getUri (string $ label , string $ issuer , int $ hotpCounter = null , bool $ omitSettings = null ):string {
135
+ public function getUri (string $ label , string $ issuer , ? int $ hotpCounter = null , ? bool $ omitSettings = null ):string {
136
136
$ label = trim ($ label );
137
137
$ issuer = trim ($ issuer );
138
138
0 commit comments