Skip to content

Commit ebd39d3

Browse files
committed
Fix the minor code styling issue
1 parent 406d000 commit ebd39d3

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class AccountManagement implements AccountManagementInterface
259259
/**
260260
* @var CollectionFactory
261261
*/
262-
private $visitorCollectionFactory;
262+
private $visitorColFactory;
263263

264264
/**
265265
* @var DataObjectProcessor
@@ -360,7 +360,7 @@ class AccountManagement implements AccountManagementInterface
360360
* @param AccountConfirmation|null $accountConfirmation
361361
* @param SessionManagerInterface|null $sessionManager
362362
* @param SaveHandlerInterface|null $saveHandler
363-
* @param CollectionFactory|null $visitorCollectionFactory
363+
* @param CollectionFactory|null $visitorColFactory
364364
* @param AddressRegistry|null $addressRegistry
365365
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
366366
*/
@@ -393,7 +393,7 @@ public function __construct(
393393
AccountConfirmation $accountConfirmation = null,
394394
SessionManagerInterface $sessionManager = null,
395395
SaveHandlerInterface $saveHandler = null,
396-
CollectionFactory $visitorCollectionFactory = null,
396+
CollectionFactory $visitorColFactory = null,
397397
AddressRegistry $addressRegistry = null
398398
) {
399399
$this->customerFactory = $customerFactory;
@@ -428,7 +428,7 @@ public function __construct(
428428
?: ObjectManager::getInstance()->get(SessionManagerInterface::class);
429429
$this->saveHandler = $saveHandler
430430
?: ObjectManager::getInstance()->get(SaveHandlerInterface::class);
431-
$this->visitorCollectionFactory = $visitorCollectionFactory
431+
$this->visitorColFactory = $visitorColFactory
432432
?: ObjectManager::getInstance()->get(CollectionFactory::class);
433433
$this->addressRegistry = $addressRegistry
434434
?: ObjectManager::getInstance()->get(AddressRegistry::class);
@@ -1480,7 +1480,7 @@ private function destroyCustomerSessions($customerId)
14801480
$activeSessionsTime = $dateTime->setTimestamp($dateTime->getTimestamp() - $sessionLifetime)
14811481
->format(DateTime::DATETIME_PHP_FORMAT);
14821482
/** @var \Magento\Customer\Model\ResourceModel\Visitor\Collection $visitorCollection */
1483-
$visitorCollection = $this->visitorCollectionFactory->create();
1483+
$visitorCollection = $this->visitorColFactory->create();
14841484
$visitorCollection->addFieldToFilter('customer_id', $customerId);
14851485
$visitorCollection->addFieldToFilter('last_visit_at', ['from' => $activeSessionsTime]);
14861486
$visitorCollection->addFieldToFilter('session_id', ['neq' => $this->sessionManager->getSessionId()]);

app/code/Magento/Customer/Test/Unit/Model/AccountManagementTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class AccountManagementTest extends \PHPUnit\Framework\TestCase
135135
/**
136136
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory
137137
*/
138-
private $visitorCollectionFactory;
138+
private $visitorColFactory;
139139

140140
/**
141141
* @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Session\SaveHandlerInterface
@@ -200,7 +200,7 @@ protected function setUp()
200200
$this->dateTimeFactory = $this->createMock(DateTimeFactory::class);
201201
$this->accountConfirmation = $this->createMock(AccountConfirmation::class);
202202

203-
$this->visitorCollectionFactory = $this->getMockBuilder(
203+
$this->visitorColFactory = $this->getMockBuilder(
204204
\Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory::class
205205
)
206206
->disableOriginalConstructor()
@@ -244,7 +244,7 @@ protected function setUp()
244244
'accountConfirmation' => $this->accountConfirmation,
245245
'sessionManager' => $this->sessionManager,
246246
'saveHandler' => $this->saveHandler,
247-
'visitorCollectionFactory' => $this->visitorCollectionFactory,
247+
'visitorColFactory' => $this->visitorColFactory,
248248
'addressRegistry' => $this->addressRegistryMock,
249249
]
250250
);
@@ -1385,7 +1385,7 @@ private function reInitModel()
13851385
$this->sessionManager = $this->getMockBuilder(\Magento\Framework\Session\SessionManagerInterface::class)
13861386
->disableOriginalConstructor()
13871387
->getMockForAbstractClass();
1388-
$this->visitorCollectionFactory = $this->getMockBuilder(
1388+
$this->visitorColFactory = $this->getMockBuilder(
13891389
\Magento\Customer\Model\ResourceModel\Visitor\CollectionFactory::class
13901390
)
13911391
->disableOriginalConstructor()
@@ -1431,7 +1431,7 @@ private function reInitModel()
14311431
'stringHelper' => $this->string,
14321432
'scopeConfig' => $this->scopeConfig,
14331433
'sessionManager' => $this->sessionManager,
1434-
'visitorCollectionFactory' => $this->visitorCollectionFactory,
1434+
'visitorColFactory' => $this->visitorColFactory,
14351435
'saveHandler' => $this->saveHandler,
14361436
'encryptor' => $this->encryptor,
14371437
'dataProcessor' => $this->dataObjectProcessor,
@@ -1530,7 +1530,7 @@ public function testChangePassword()
15301530
->disableOriginalConstructor()->setMethods(['addFieldToFilter', 'getItems'])->getMock();
15311531
$visitorCollection->expects($this->atLeastOnce())->method('addFieldToFilter')->willReturnSelf();
15321532
$visitorCollection->expects($this->atLeastOnce())->method('getItems')->willReturn([$visitor, $visitor]);
1533-
$this->visitorCollectionFactory->expects($this->atLeastOnce())->method('create')
1533+
$this->visitorColFactory->expects($this->atLeastOnce())->method('create')
15341534
->willReturn($visitorCollection);
15351535
$this->saveHandler->expects($this->atLeastOnce())->method('destroy')
15361536
->withConsecutive(
@@ -1584,7 +1584,7 @@ function ($string) {
15841584
->disableOriginalConstructor()->setMethods(['addFieldToFilter', 'getItems'])->getMock();
15851585
$visitorCollection->expects($this->atLeastOnce())->method('addFieldToFilter')->willReturnSelf();
15861586
$visitorCollection->expects($this->atLeastOnce())->method('getItems')->willReturn([$visitor, $visitor]);
1587-
$this->visitorCollectionFactory->expects($this->atLeastOnce())->method('create')
1587+
$this->visitorColFactory->expects($this->atLeastOnce())->method('create')
15881588
->willReturn($visitorCollection);
15891589
$this->saveHandler->expects($this->atLeastOnce())->method('destroy')
15901590
->withConsecutive(

0 commit comments

Comments
 (0)