Skip to content

Commit 7597003

Browse files
committed
Fixed Code Style Issues
1 parent 3cf8f22 commit 7597003

File tree

4 files changed

+20
-55
lines changed

4 files changed

+20
-55
lines changed

app/code/Magento/Customer/Api/RedirectCookieManagerInterface.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

app/code/Magento/Customer/Model/Account/Redirect.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@
2020
use Magento\Framework\Url\DecoderInterface;
2121
use Magento\Framework\App\ObjectManager;
2222
use Magento\Framework\Stdlib\CookieManagerInterface;
23-
use Magento\Customer\Api\RedirectCookieManagerInterface;
23+
use Magento\Customer\Model\RedirectCookieManager;
2424

2525
/**
26+
* Account Redirect
2627
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2728
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
28-
*
2929
*/
3030
class Redirect
3131
{
3232
/** @deprecated
33+
* @see \Magento\Customer\Model\RedirectCookieManager
3334
* URL to redirect user on successful login or registration
3435
*/
3536
const LOGIN_REDIRECT_URL = 'login_redirect';
@@ -76,7 +77,7 @@ class Redirect
7677
protected $cookieManager;
7778

7879
/**
79-
* @var RedirectCookieManagerInterface
80+
* @var RedirectCookieManager
8081
*/
8182
protected $redirectCookieManager;
8283

@@ -100,7 +101,7 @@ class Redirect
100101
* @param DecoderInterface $urlDecoder
101102
* @param CustomerUrl $customerUrl
102103
* @param ResultFactory $resultFactory
103-
* @param RedirectCookieManagerInterface $redirectCookieManager
104+
* @param RedirectCookieManager $redirectCookieManager
104105
* @param HostChecker|null $hostChecker
105106
*/
106107
public function __construct(
@@ -112,7 +113,7 @@ public function __construct(
112113
DecoderInterface $urlDecoder,
113114
CustomerUrl $customerUrl,
114115
ResultFactory $resultFactory,
115-
RedirectCookieManagerInterface $redirectCookieManager,
116+
RedirectCookieManager $redirectCookieManager,
116117
HostChecker $hostChecker = null
117118
) {
118119
$this->request = $request;
@@ -254,6 +255,7 @@ private function applyRedirect($url)
254255
* Get Cookie manager. For release backward compatibility.
255256
*
256257
* @deprecated 100.0.10
258+
* @see \Magento\Customer\Model\RedirectCookieManager
257259
* @return CookieManagerInterface
258260
*/
259261
protected function getCookieManager()
@@ -268,6 +270,7 @@ protected function getCookieManager()
268270
* Set cookie manager. For unit tests.
269271
*
270272
* @deprecated 100.0.10
273+
* @see \Magento\Customer\Model\RedirectCookieManager
271274
* @param object $value
272275
* @return void
273276
*/

app/code/Magento/Customer/Model/RedirectCookieManager.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
*/
1919
class RedirectCookieManager implements RedirectCookieManagerInterface
2020
{
21-
/**
22-
* Cookie name
23-
*/
2421
const COOKIE_NAME = 'login_redirect';
2522

2623
/**
@@ -46,15 +43,21 @@ public function __construct(
4643
}
4744

4845
/**
49-
* {@inheritdoc}
46+
* Get redirect route from cookie for case of successful login/registration
47+
*
48+
* @return null|string
5049
*/
5150
public function getRedirectCookie()
5251
{
5352
return $this->cookieManager->getCookie(self::COOKIE_NAME, null);
5453
}
5554

5655
/**
57-
* {@inheritdoc}
56+
* Save redirect route to cookie for case of successful login/registration
57+
*
58+
* @param string $route
59+
* @param StoreInterface $store
60+
* @return void
5861
*/
5962
public function setRedirectCookie($route, StoreInterface $store)
6063
{
@@ -66,7 +69,10 @@ public function setRedirectCookie($route, StoreInterface $store)
6669
}
6770

6871
/**
69-
* {@inheritdoc}
72+
* Clear cookie with requested route
73+
*
74+
* @param StoreInterface $store
75+
* @return void
7076
*/
7177
public function clearRedirectCookie(StoreInterface $store)
7278
{

app/code/Magento/Customer/etc/di.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,4 @@
468468
<preference
469469
for="Magento\Customer\Api\AccountDelegationInterface"
470470
type="Magento\Customer\Model\Delegation\AccountDelegation" />
471-
<preference
472-
for="Magento\Customer\Api\RedirectCookieManagerInterface"
473-
type="Magento\Customer\Model\RedirectCookieManager" />
474471
</config>

0 commit comments

Comments
 (0)