Skip to content

Commit 453c495

Browse files
author
Cari Spruiell
committed
MAGETWO-36514: Fix builds
- added phpdoc - removed unused variables in tests
1 parent 6c795cf commit 453c495

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

app/code/Magento/Quote/Model/Webapi/ParamOverriderCartId.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ class ParamOverriderCartId implements ParamOverriderInterface
2626
*/
2727
private $cartManagement;
2828

29+
/**
30+
* Constructs an object to override the cart ID parameter on a request.
31+
*
32+
* @param UserContextInterface $userContext
33+
* @param CartManagementInterface $cartManagement
34+
*/
2935
public function __construct(
3036
UserContextInterface $userContext,
3137
CartManagementInterface $cartManagement
@@ -34,6 +40,9 @@ public function __construct(
3440
$this->cartManagement = $cartManagement;
3541
}
3642

43+
/**
44+
* {@inheritDoc}
45+
*/
3746
public function getOverridenValue()
3847
{
3948
try {

app/code/Magento/Quote/Test/Unit/Model/Webapi/ParamOverriderCartIdTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ public function testGetOverridenValueIsCustomerAndCartExists()
6969

7070
public function testGetOverridenValueIsCustomerAndCartDoesNotExist()
7171
{
72-
$retValue = 'retValue';
7372
$customerId = 1;
7473

7574
$this->userContext->expects($this->once())
@@ -79,8 +78,6 @@ public function testGetOverridenValueIsCustomerAndCartDoesNotExist()
7978
->method('getUserId')
8079
->will($this->returnValue($customerId));
8180

82-
$cart = $this->getMockBuilder('Magento\Quote\Api\Data\CartInterface')
83-
->getMockForAbstractClass();
8481
$this->cartManagement->expects($this->once())
8582
->method('getCartForCustomer')
8683
->with($customerId)
@@ -91,7 +88,6 @@ public function testGetOverridenValueIsCustomerAndCartDoesNotExist()
9188

9289
public function testGetOverridenValueIsCustomerAndCartIsNull()
9390
{
94-
$retValue = 'retValue';
9591
$customerId = 1;
9692

9793
$this->userContext->expects($this->once())
@@ -101,8 +97,6 @@ public function testGetOverridenValueIsCustomerAndCartIsNull()
10197
->method('getUserId')
10298
->will($this->returnValue($customerId));
10399

104-
$cart = $this->getMockBuilder('Magento\Quote\Api\Data\CartInterface')
105-
->getMockForAbstractClass();
106100
$this->cartManagement->expects($this->once())
107101
->method('getCartForCustomer')
108102
->with($customerId)

app/code/Magento/Webapi/Controller/Rest/ParamOverriderCustomerId.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,19 @@ class ParamOverriderCustomerId implements ParamOverriderInterface
1919
*/
2020
private $userContext;
2121

22+
/**
23+
* Constructs an object to override the customer ID parameter on a request.
24+
*
25+
* @param UserContextInterface $userContext
26+
*/
2227
public function __construct(UserContextInterface $userContext)
2328
{
2429
$this->userContext = $userContext;
2530
}
2631

32+
/**
33+
* {@inheritDoc}
34+
*/
2735
public function getOverridenValue()
2836
{
2937
if ($this->userContext->getUserType() === UserContextInterface::USER_TYPE_CUSTOMER) {

dev/tests/api-functional/testsuite/Magento/Quote/Api/CartTotalRepositoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ public function testGetMyTotals()
189189
/** @var \Magento\Quote\Model\Quote $quote */
190190
$quote = $this->objectManager->create('Magento\Quote\Model\Quote');
191191
$quote->load('test_order_1', 'reserved_order_id');
192-
$cartId = $quote->getId();
193192

194193
$serviceInfo = [
195194
'rest' => [

0 commit comments

Comments
 (0)