File tree Expand file tree Collapse file tree 2 files changed +8
-35
lines changed
Webapi/Model/Authorization Expand file tree Collapse file tree 2 files changed +8
-35
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ protected function add(UserContextInterface $userContext)
60
60
*/
61
61
public function getUserId ()
62
62
{
63
- return $ this ->getUserContext () ? $ this ->getUserContext ()->getUserId () : null ;
63
+ return $ this ->getUserContext () ? (( int ) $ this ->getUserContext ()->getUserId () ) : null ;
64
64
}
65
65
66
66
/**
Original file line number Diff line number Diff line change @@ -24,47 +24,32 @@ class SoapUserContext implements UserContextInterface
24
24
/**
25
25
* @var Request
26
26
*/
27
- protected $ request ;
27
+ private $ request ;
28
28
29
29
/**
30
30
* @var Token
31
31
*/
32
- protected $ tokenFactory ;
32
+ private $ tokenFactory ;
33
33
34
34
/**
35
35
* @var int
36
36
*/
37
- protected $ userId ;
37
+ private $ userId ;
38
38
39
39
/**
40
40
* @var string
41
41
*/
42
- protected $ userType ;
42
+ private $ userType ;
43
43
44
44
/**
45
45
* @var bool
46
46
*/
47
- protected $ isRequestProcessed ;
47
+ private $ isRequestProcessed ;
48
48
49
49
/**
50
50
* @var IntegrationServiceInterface
51
51
*/
52
- protected $ integrationService ;
53
-
54
- /**
55
- * @var DateTime
56
- */
57
- private $ dateTime ;
58
-
59
- /**
60
- * @var Date
61
- */
62
- private $ date ;
63
-
64
- /**
65
- * @var OauthHelper
66
- */
67
- private $ oauthHelper ;
52
+ private $ integrationService ;
68
53
69
54
/**
70
55
* Initialize dependencies.
@@ -79,23 +64,11 @@ class SoapUserContext implements UserContextInterface
79
64
public function __construct (
80
65
Request $ request ,
81
66
TokenFactory $ tokenFactory ,
82
- IntegrationServiceInterface $ integrationService ,
83
- DateTime $ dateTime = null ,
84
- Date $ date = null ,
85
- OauthHelper $ oauthHelper = null
67
+ IntegrationServiceInterface $ integrationService
86
68
) {
87
69
$ this ->request = $ request ;
88
70
$ this ->tokenFactory = $ tokenFactory ;
89
71
$ this ->integrationService = $ integrationService ;
90
- $ this ->dateTime = $ dateTime ?: ObjectManager::getInstance ()->get (
91
- DateTime::class
92
- );
93
- $ this ->date = $ date ?: ObjectManager::getInstance ()->get (
94
- Date::class
95
- );
96
- $ this ->oauthHelper = $ oauthHelper ?: ObjectManager::getInstance ()->get (
97
- OauthHelper::class
98
- );
99
72
}
100
73
101
74
/**
You can’t perform that action at this time.
0 commit comments