Skip to content

Commit 401f729

Browse files
author
Jan Polak
committed
Coding standards refactor
1 parent 6e9cf96 commit 401f729

File tree

9 files changed

+18
-12
lines changed

9 files changed

+18
-12
lines changed

app/code/Magento/InstantPurchase/Controller/Button/Available.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(
4747
Config $instantPurchaseConfig
4848
) {
4949
parent::__construct($context);
50-
$this->InstantPurchase = $instantPurchase;
50+
$this->instantPurchase = $instantPurchase;
5151
$this->customerSession = $customerSession;
5252
$this->customerAddressesFormatter = $customerAddressesFormatter;
5353
$this->instantPurchaseConfig = $instantPurchaseConfig;
@@ -64,7 +64,7 @@ public function execute()
6464
return $result;
6565
}
6666
$customer = $this->customerSession->getCustomer();
67-
$available = $this->InstantPurchase->isAvailableForCustomer($customer);
67+
$available = $this->instantPurchase->isAvailableForCustomer($customer);
6868
$resultData = [
6969
'available' => $available
7070
];

app/code/Magento/InstantPurchase/Model/CustomerDataGetterFactory.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,22 @@ class CustomerDataGetterFactory
1515
*/
1616
private $objectManager;
1717

18+
/**
19+
* CustomerDataGetterFactory constructor.
20+
* @param ObjectManager $objectManager
21+
*/
1822
public function __construct(
1923
ObjectManager $objectManager
2024
) {
2125
$this->objectManager = $objectManager;
2226
}
2327

24-
public function create(Customer $customer)
28+
/**
29+
* @param Customer $customer
30+
* @return CustomerDataGetter
31+
*/
32+
public function create(Customer $customer): CustomerDataGetter
2533
{
2634
return $this->objectManager->create(CustomerDataGetter::class, ['customer' => $customer]);
2735
}
28-
}
36+
}

app/code/Magento/InstantPurchase/Model/InstantPurchase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ private function isBrainTreeAvailable(): bool
114114
/**
115115
* @return bool
116116
*/
117-
private function isBrainTree3DDisabled()
117+
private function isBrainTree3DDisabled(): bool
118118
{
119119
return !$this->brainTreeConfig->isVerify3DSecure();
120120
}

app/code/Magento/InstantPurchase/Model/PaymentPreparer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ public function prepare(Quote $quote, string $customerId, string $ccId)
4343
);
4444
$quote->collectTotals();
4545
}
46-
}
46+
}

app/code/Magento/InstantPurchase/Model/ShippingRateChooser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ public function choose(Quote $quote): Quote
5353

5454
return $quote;
5555
}
56-
}
56+
}

app/code/Magento/InstantPurchase/Model/ShippingRateChooserRuleInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\InstantPurchase\Model;
77

8-
use Magento\Quote\Model\Quote;
9-
108
/**
119
* Interface ShippingRateChooserInterface
1210
*/

app/code/Magento/InstantPurchase/Test/Unit/Model/CustomerDataGetterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
use Magento\Customer\Model\Address;
99
use Magento\Customer\Model\Customer;
10-
use Magento\Framework\Exception\LocalizedException;
1110
use Magento\InstantPurchase\Model\CustomerDataGetter;
1211
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1312
use PHPUnit\Framework\TestCase;

app/code/Magento/InstantPurchase/Test/Unit/Model/ShippingRateChooserTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public function setUp()
4545
['setCollectShippingRates', 'collectShippingRates', 'getAllShippingRates', 'setShippingMethod']
4646
)->getMock();
4747
$this->shippingRateChooserRule = $this->createMock(ShippingRateChooserRuleInterface::class);
48-
$this->shippingRateChooser = $objectManager->getObject(ShippingRateChooser::class,
48+
$this->shippingRateChooser = $objectManager->getObject(
49+
ShippingRateChooser::class,
4950
['shippingRateChooserRule' => $this->shippingRateChooserRule]
5051
);
5152
}

app/code/Magento/InstantPurchase/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "magento/module-instant-purchaseing",
2+
"name": "magento/module-instant-purchase",
33
"description": "N/A",
44
"type": "magento2-module",
55
"version": "100.3.0-dev",

0 commit comments

Comments
 (0)