File tree Expand file tree Collapse file tree 3 files changed +13
-22
lines changed Expand file tree Collapse file tree 3 files changed +13
-22
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,9 @@ public function __construct(
46
46
OAuthOptions |SettingsContainerInterface $ options = new OAuthOptions ,
47
47
LoggerInterface $ logger = new NullLogger
48
48
){
49
- $ this ->oauthUser = $ oauthUser ;
50
-
51
49
parent ::__construct ($ options , $ logger );
52
- }
53
50
54
- /**
55
- * @inheritDoc
56
- */
57
- protected function construct ():void {
58
- $ this ->oauthUser = trim ((string )$ this ->oauthUser );
51
+ $ this ->oauthUser = trim ((string )$ oauthUser );
59
52
60
53
if ($ this ->oauthUser === '' ){
61
54
throw new OAuthStorageException ('invalid OAuth user ' );
Original file line number Diff line number Diff line change @@ -50,23 +50,13 @@ public function __construct(
50
50
OAuthOptions |SettingsContainerInterface $ options = new OAuthOptions ,
51
51
LoggerInterface $ logger = new NullLogger
52
52
){
53
+ $ this ->options = $ options ;
54
+ $ this ->logger = $ logger ;
53
55
54
56
if ($ this ->options ->useStorageEncryption === true && empty ($ this ->options ->storageEncryptionKey )){
55
57
throw new OAuthStorageException ('no encryption key given ' );
56
58
}
57
59
58
- $ this ->options = $ options ;
59
- $ this ->logger = $ logger ;
60
-
61
- $ this ->construct ();
62
- }
63
-
64
- /**
65
- * A replacement constructor that you can call in extended classes,
66
- * so that you don't have to implement the monstrous original `__construct()`
67
- */
68
- protected function construct ():void {
69
- // noop
70
60
}
71
61
72
62
/**
Original file line number Diff line number Diff line change 11
11
12
12
namespace chillerlan \OAuth \Storage ;
13
13
14
+ use chillerlan \OAuth \OAuthOptions ;
14
15
use chillerlan \OAuth \Core \AccessToken ;
16
+ use chillerlan \Settings \SettingsContainerInterface ;
17
+ use Psr \Log \{LoggerInterface , NullLogger };
15
18
use function session_start , session_status , session_write_close ;
16
19
use const PHP_SESSION_ACTIVE , PHP_SESSION_DISABLED ;
17
20
@@ -28,9 +31,14 @@ class SessionStorage extends OAuthStorageAbstract{
28
31
protected string $ storageVar ;
29
32
30
33
/**
31
- * SessionStorage (pseudo-) constructor.
34
+ * @inheritDoc
32
35
*/
33
- public function construct ():void {
36
+ public function __construct (
37
+ OAuthOptions |SettingsContainerInterface $ options = new OAuthOptions ,
38
+ LoggerInterface $ logger = new NullLogger
39
+ ){
40
+ parent ::__construct ($ options , $ logger );
41
+
34
42
$ this ->storageVar = $ this ->options ->sessionStorageVar ;
35
43
36
44
// Determine if the session has started.
You can’t perform that action at this time.
0 commit comments