File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
app/code/Magento/Customer/Model Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 17
17
use Magento \Customer \Model \Metadata \Validator ;
18
18
use Magento \Framework \Api \ExtensibleDataObjectConverter ;
19
19
use Magento \Framework \App \Config \ScopeConfigInterface ;
20
- use Magento \Framework \App \ObjectManager ;
21
20
use Magento \Framework \AuthorizationInterface ;
22
21
use Magento \Framework \DataObjectFactory as ObjectFactory ;
23
22
use Magento \Framework \Encryption \EncryptorInterface as Encryptor ;
@@ -99,8 +98,7 @@ public function __construct(
99
98
ExtensibleDataObjectConverter $ extensibleDataObjectConverter ,
100
99
AuthorizationInterface $ authorization
101
100
) {
102
- $ objectManager = ObjectManager::getInstance ();
103
- $ this ->authorization = $ authorization ?? $ objectManager ->get (AuthorizationInterface::class);
101
+ $ this ->authorization = $ authorization ;
104
102
parent ::__construct (
105
103
$ customerFactory ,
106
104
$ eventManager ,
@@ -133,7 +131,7 @@ public function __construct(
133
131
*
134
132
* Override createAccount method to unset confirmation attribute for security purposes.
135
133
*/
136
- public function createAccount (CustomerInterface $ customer , $ password = null , $ redirectUrl = '' )
134
+ public function createAccount (CustomerInterface $ customer , $ password = null , $ redirectUrl = '' ): CustomerInterface
137
135
{
138
136
$ this ->validateCustomerRequest ($ customer );
139
137
$ customer = parent ::createAccount ($ customer , $ password , $ redirectUrl );
You can’t perform that action at this time.
0 commit comments