Skip to content

Commit c552e5f

Browse files
committed
clean up code style issues (#22833)
1 parent cf66338 commit c552e5f

File tree

8 files changed

+17
-11
lines changed

8 files changed

+17
-11
lines changed

app/code/Magento/Security/Model/AdminSessionsManager.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ public function processLogin()
127127
}
128128
}
129129

130-
if ($this->authSession->getUser()->getExpiresAt())
131-
{
130+
if ($this->authSession->getUser()->getExpiresAt()) {
132131
$this->revokeExpiredAdminUser();
133132
}
134133

@@ -155,8 +154,7 @@ public function processProlong()
155154
}
156155

157156
// todo: don't necessarily have a user here
158-
if ($this->authSession->getUser()->getExpiresAt())
159-
{
157+
if ($this->authSession->getUser()->getExpiresAt()) {
160158
$this->revokeExpiredAdminUser();
161159
}
162160

app/code/Magento/Security/Test/Unit/Model/AdminSessionsManagerTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ public function setUp()
9191
['create']
9292
);
9393

94-
$this->currentSessionMock = $this->createPartialMock(\Magento\Security\Model\AdminSessionInfo::class, [
94+
$this->currentSessionMock = $this->createPartialMock(
95+
\Magento\Security\Model\AdminSessionInfo::class, [
9596
'isActive',
9697
'getStatus',
9798
'load',
@@ -101,7 +102,8 @@ public function setUp()
101102
'getUserId',
102103
'getSessionId',
103104
'getUpdatedAt'
104-
]);
105+
]
106+
);
105107

106108
$this->securityConfigMock = $this->getMockBuilder(\Magento\Security\Model\ConfigInterface::class)
107109
->disableOriginalConstructor()

app/code/Magento/User/Model/ResourceModel/User/Collection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
1616

1717
/**
1818
* Define resource model
19+
*
1920
* @return void
2021
*/
2122
protected function _construct()
@@ -44,7 +45,8 @@ protected function _initSelect()
4445

4546
/**
4647
* Filter for expired, active users.
47-
* @param null $now
48+
*
49+
* @param string $now
4850
* @return $this
4951
*/
5052
public function addActiveExpiredUsersFilter($now = null)

app/code/Magento/User/Model/UserValidationRules.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public function addPasswordConfirmationRule(
144144

145145
/**
146146
* Adds validation rule for expiration date.
147+
*
147148
* @param \Magento\Framework\Validator\DataObject $validator
148149
* @return \Magento\Framework\Validator\DataObject
149150
* @throws \Zend_Validate_Exception

app/code/Magento/User/Model/Validator/ExpiresAt.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class ExpiresAt extends AbstractValidator
1717

1818
/**
1919
* Ensure that the given date is later than the current date.
20+
*
2021
* @param String $value
2122
* @return bool
2223
* @throws \Exception

app/code/Magento/User/etc/crontab.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
28
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
39
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
410

dev/tests/integration/testsuite/Magento/User/Cron/DisableExpiredUsersTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,5 @@ public function testExecuteWithNonExpiredUser()
7373
static::assertEquals(1, $user->getIsActive());
7474
static::assertNotNull($user->getExpiresAt());
7575
static::assertNotNull($token->getId());
76-
7776
}
78-
7977
}

dev/tests/integration/testsuite/Magento/User/_files/expired_users.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,3 @@
5353
$sql = "UPDATE " . $tableName . " SET expires_at = '2010-01-01 00:00:00' WHERE user_id=" .
5454
$userIds[0] . ";";
5555
$result = $conn->query($sql);
56-
57-

0 commit comments

Comments
 (0)