diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php
index 48b4c58918740..17e7ffc20c5e9 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php
@@ -213,7 +213,7 @@ protected function setUp()
'_getCustomerGroupById',
'correctExportData'
]);
- $this->advancedPricing = $this->getMockbuilder(
+ $this->advancedPricing = $this->getMockBuilder(
\Magento\AdvancedPricingImportExport\Model\Export\AdvancedPricing::class
)
->setMethods($mockMethods)
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php
index cbf06264096ac..407e323aeaae6 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/AdditionalCommentTest.php
@@ -65,11 +65,11 @@ public function testRender()
->method('getLabel')
->willReturn('Comment label');
$html = $this->additionalComment->render($this->abstractElementMock);
- $this->assertRegexp(
+ $this->assertRegExp(
"/New comment/",
$html
);
- $this->assertRegexp(
+ $this->assertRegExp(
"/Comment label/",
$html
);
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
index 462b3c909a7fd..d567d65882350 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/CollectionTimeLabelTest.php
@@ -87,7 +87,7 @@ public function testRender()
$this->localeResolver->expects($this->once())
->method('getLocale')
->willReturn('en_US');
- $this->assertRegexp(
+ $this->assertRegExp(
"/Eastern Standard Time \(America\/New_York\)/",
$this->collectionTimeLabel->render($this->abstractElementMock)
);
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
index d643bc05cc615..78ff581f3de9d 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/SubscriptionStatusLabelTest.php
@@ -74,7 +74,7 @@ public function testRender()
$this->abstractElementMock->expects($this->any())
->method('getComment')
->willReturn('Subscription status: Enabled');
- $this->assertRegexp(
+ $this->assertRegExp(
"/Subscription status: Enabled/",
$this->subscriptionStatusLabel->render($this->abstractElementMock)
);
diff --git a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
index abce48c36c86a..6a0cecc781062 100644
--- a/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
+++ b/app/code/Magento/Analytics/Test/Unit/Block/Adminhtml/System/Config/VerticalTest.php
@@ -65,7 +65,7 @@ public function testRender()
->method('getHint')
->willReturn('New hint');
$html = $this->vertical->render($this->abstractElementMock);
- $this->assertRegexp(
+ $this->assertRegExp(
"/New comment/",
$html
);
diff --git a/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php b/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php
index e89e604867baa..32abeac4c8ffb 100644
--- a/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php
+++ b/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php
@@ -85,7 +85,7 @@ public function handle(array $handlingSubject, array $response)
private function getCreditCardType($type)
{
$replaced = str_replace(' ', '-', strtolower($type));
- $mapper = $this->config->getCctypesMapper();
+ $mapper = $this->config->getCcTypesMapper();
return $mapper[$replaced];
}
diff --git a/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php b/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php
index 7c307185b4c22..8880f9c1b1a3e 100644
--- a/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php
+++ b/app/code/Magento/Braintree/Gateway/Response/VaultDetailsHandler.php
@@ -157,7 +157,7 @@ private function convertDetailsToJSON($details)
private function getCreditCardType($type)
{
$replaced = str_replace(' ', '-', strtolower($type));
- $mapper = $this->config->getCctypesMapper();
+ $mapper = $this->config->getCcTypesMapper();
return $mapper[$replaced];
}
diff --git a/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php b/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
index fe30e790de07c..928769498a035 100644
--- a/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
+++ b/app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
@@ -70,7 +70,7 @@ public function getConfig()
self::CODE => [
'isActive' => $this->config->isActive($storeId),
'clientToken' => $this->getClientToken(),
- 'ccTypesMapper' => $this->config->getCctypesMapper(),
+ 'ccTypesMapper' => $this->config->getCcTypesMapper(),
'sdkUrl' => $this->config->getSdkUrl(),
'countrySpecificCardTypes' => $this->config->getCountrySpecificCardTypeConfig($storeId),
'availableCardTypes' => $this->config->getAvailableCardTypes($storeId),
diff --git a/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php b/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php
index 7b9d59a5bc482..36ea3aea465dd 100644
--- a/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php
+++ b/app/code/Magento/Braintree/Test/Unit/Gateway/Config/ConfigTest.php
@@ -142,7 +142,7 @@ public function testGetCcTypesMapper($value, $expected)
static::assertEquals(
$expected,
- $this->model->getCctypesMapper()
+ $this->model->getCcTypesMapper()
);
}
diff --git a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php
index ba716fdb53c89..47a60a1916142 100644
--- a/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php
+++ b/app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/ShowUpdateResultTest.php
@@ -58,7 +58,7 @@ protected function getContext()
$objectManagerMock = $this->getMockForAbstractClass(\Magento\Framework\ObjectManagerInterface::class);
$objectManagerMock->expects($this->any())
->method('get')
- ->willreturn($productActionMock);
+ ->willReturn($productActionMock);
$eventManager = $this->getMockBuilder(\Magento\Framework\Event\Manager::class)
->setMethods(['dispatch'])
diff --git a/app/code/Magento/Checkout/Setup/Patch/Data/PrepareInitialCheckoutConfiguration.php b/app/code/Magento/Checkout/Setup/Patch/Data/PrepareInitialCheckoutConfiguration.php
index bc38809d070b2..47a19fb3234fd 100644
--- a/app/code/Magento/Checkout/Setup/Patch/Data/PrepareInitialCheckoutConfiguration.php
+++ b/app/code/Magento/Checkout/Setup/Patch/Data/PrepareInitialCheckoutConfiguration.php
@@ -817,7 +817,7 @@ public function apply()
$connection->commit();
} catch (\Exception $e) {
- $connection->rollback();
+ $connection->rollBack();
throw $e;
}
}
diff --git a/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php b/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php
index 029949c5f35b0..71b99586f6fb4 100644
--- a/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php
+++ b/app/code/Magento/Customer/Test/Unit/Model/Customer/DataProviderTest.php
@@ -1266,7 +1266,7 @@ public function testGetDataWithVisibleAttributesWithAccountEdit()
$helper = new ObjectManager($this);
$context = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class)
->setMethods(['getRequestParam'])
- ->getMockforAbstractClass();
+ ->getMockForAbstractClass();
$context->expects($this->any())
->method('getRequestParam')
->with('request-field-name')
diff --git a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php
index d988dfc63c959..a9aead6325c39 100644
--- a/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php
+++ b/app/code/Magento/Eav/Test/Unit/Model/ResourceModel/Attribute/CollectionTest.php
@@ -115,7 +115,7 @@ protected function setUp()
$this->connectionMock->expects($this->any())->method('quoteIdentifier')->will($this->returnArgument(0));
$this->connectionMock->expects($this->any())
->method('describeTable')
- ->will($this->returnvalueMap(
+ ->will($this->returnValueMap(
[
[
'some_main_table',
diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php
index c0c5dfef277b8..0d7ebd74f724f 100644
--- a/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php
+++ b/app/code/Magento/Newsletter/Model/ResourceModel/Problem/Collection.php
@@ -165,8 +165,8 @@ protected function _addCustomersData()
$customerName = $this->_customerView->getCustomerName($customer);
foreach ($problems as $problem) {
$problem->setCustomerName($customerName)
- ->setCustomerFirstName($customer->getFirstName())
- ->setCustomerLastName($customer->getLastName());
+ ->setCustomerFirstName($customer->getFirstname())
+ ->setCustomerLastName($customer->getLastname());
}
} catch (NoSuchEntityException $e) {
// do nothing if customer is not found by id
diff --git a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php
index 9e98998f7f6ec..189549d2a73d2 100644
--- a/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php
+++ b/app/code/Magento/Newsletter/Model/ResourceModel/Queue/Collection.php
@@ -221,7 +221,7 @@ public function addOnlyForSendingFilter()
[\Magento\Newsletter\Model\Queue::STATUS_SENDING, \Magento\Newsletter\Model\Queue::STATUS_NEVER]
)->where(
'main_table.queue_start_at < ?',
- $this->_date->gmtdate()
+ $this->_date->gmtDate()
)->where(
'main_table.queue_start_at IS NOT NULL'
);
diff --git a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php
index fc36eaf6a97db..0c4718245928b 100644
--- a/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php
+++ b/app/code/Magento/OfflineShipping/Model/ResourceModel/Carrier/Tablerate.php
@@ -320,7 +320,7 @@ public function getConditionName(\Magento\Framework\DataObject $object)
*/
private function getCsvFile($filePath)
{
- $pathInfo = pathInfo($filePath);
+ $pathInfo = pathinfo($filePath);
$dirName = isset($pathInfo['dirname']) ? $pathInfo['dirname'] : '';
$fileName = isset($pathInfo['basename']) ? $pathInfo['basename'] : '';
diff --git a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php
index ee0ffd3bcc666..73ed2e65b41a9 100644
--- a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php
+++ b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php
@@ -94,7 +94,7 @@ public function testCreateEmptyCart()
$cartId = 1;
$this->quoteIdMaskMock->expects($this->once())->method('setQuoteId')->with($cartId)->willReturnSelf();
$this->quoteIdMaskMock->expects($this->once())->method('save')->willReturnSelf();
- $this->quoteIdMaskMock->expects($this->once())->method('getMaskedId')->willreturn($maskedCartId);
+ $this->quoteIdMaskMock->expects($this->once())->method('getMaskedId')->willReturn($maskedCartId);
$this->quoteIdMaskFactoryMock->expects($this->once())->method('create')->willReturn($this->quoteIdMaskMock);
$this->quoteManagementMock->expects($this->once())->method('createEmptyCart')->willReturn($cartId);
diff --git a/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php b/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php
index 752ab088689c8..fa9676856a442 100644
--- a/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php
+++ b/app/code/Magento/Sales/Controller/Adminhtml/Order/Unhold.php
@@ -32,7 +32,7 @@ public function execute()
if (!$order->canUnhold()) {
throw new \Magento\Framework\Exception\LocalizedException(__('Can\'t unhold order.'));
}
- $this->orderManagement->unhold($order->getEntityId());
+ $this->orderManagement->unHold($order->getEntityId());
$this->messageManager->addSuccess(__('You released the order from holding status.'));
} catch (\Magento\Framework\Exception\LocalizedException $e) {
$this->messageManager->addError($e->getMessage());
diff --git a/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php b/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php
index 2a839dd018dba..492cfee5f5d83 100644
--- a/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php
+++ b/app/code/Magento/Sales/Test/Unit/Block/Order/Create/TotalsTest.php
@@ -70,10 +70,10 @@ protected function setUp()
$this->quoteMock->expects($this->any())
->method('getBillingAddress')
- ->willreturn($this->billingAddressMock);
+ ->willReturn($this->billingAddressMock);
$this->quoteMock->expects($this->any())
->method('getShippingAddress')
- ->willreturn($this->shippingAddressMock);
+ ->willReturn($this->shippingAddressMock);
$this->sessionQuoteMock->expects($this->any())->method('getQuote')->willReturn($this->quoteMock);
$this->totals = $this->helperManager->getObject(
\Magento\Sales\Block\Adminhtml\Order\Create\Totals::class,
@@ -88,7 +88,7 @@ public function testGetTotals($isVirtual)
{
$expected = 'expected';
$this->quoteMock->expects($this->at(1))->method('collectTotals');
- $this->quoteMock->expects($this->once())->method('isVirtual')->willreturn($isVirtual);
+ $this->quoteMock->expects($this->once())->method('isVirtual')->willReturn($isVirtual);
if ($isVirtual) {
$this->billingAddressMock->expects($this->once())->method('getTotals')->willReturn($expected);
} else {
diff --git a/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php b/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php
index 794fc94d6a2a8..3a5ed16fdd2fd 100644
--- a/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php
+++ b/app/code/Magento/SalesRule/Model/ResourceModel/Rule.php
@@ -239,7 +239,7 @@ public function saveStoreLabels($ruleId, $labels)
$connection->delete($table, ['rule_id=?' => $ruleId, 'store_id IN (?)' => $deleteByStoreIds]);
}
} catch (\Exception $e) {
- $connection->rollback();
+ $connection->rollBack();
throw $e;
}
$connection->commit();
diff --git a/app/code/Magento/Shipping/Model/Shipping/Labels.php b/app/code/Magento/Shipping/Model/Shipping/Labels.php
index 5c796d9fa6897..08ce168567182 100644
--- a/app/code/Magento/Shipping/Model/Shipping/Labels.php
+++ b/app/code/Magento/Shipping/Model/Shipping/Labels.php
@@ -117,8 +117,8 @@ public function requestToShipment(Shipment $orderShipment)
)
);
- if (!$admin->getFirstname()
- || !$admin->getLastname()
+ if (!$admin->getFirstName()
+ || !$admin->getLastName()
|| !$storeInfo->getName()
|| !$storeInfo->getPhone()
|| !$originStreet1
@@ -188,8 +188,8 @@ protected function setShipperDetails(
);
$request->setShipperContactPersonName($storeAdmin->getName());
- $request->setShipperContactPersonFirstName($storeAdmin->getFirstname());
- $request->setShipperContactPersonLastName($storeAdmin->getLastname());
+ $request->setShipperContactPersonFirstName($storeAdmin->getFirstName());
+ $request->setShipperContactPersonLastName($storeAdmin->getLastName());
$request->setShipperContactCompanyName($store->getName());
$request->setShipperContactPhoneNumber($store->getPhone());
$request->setShipperEmail($storeAdmin->getEmail());
diff --git a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php
index fc27e68c8e55b..707b999c5e467 100644
--- a/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php
+++ b/app/code/Magento/Tax/Test/Unit/Model/TaxClass/Type/CustomerTest.php
@@ -26,9 +26,9 @@ public function testIsAssignedToObjects()
$filterBuilder->expects($this->once())->method('setField')->with(
\Magento\Customer\Api\Data\GroupInterface::TAX_CLASS_ID
- )->willReturnself();
- $filterBuilder->expects($this->once())->method('setValue')->willReturnself();
- $filterBuilder->expects($this->once())->method('create')->willReturnself();
+ )->willReturnSelf();
+ $filterBuilder->expects($this->once())->method('setValue')->willReturnSelf();
+ $filterBuilder->expects($this->once())->method('create')->willReturnSelf();
$filterGroupBuilder = $this->createMock(\Magento\Framework\Api\Search\FilterGroupBuilder::class);
$searchCriteriaBuilder = $this->getMockBuilder(\Magento\Framework\Api\SearchCriteriaBuilder::class)
diff --git a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php
index d5919db5edcba..bbcaa87acb9c3 100644
--- a/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php
+++ b/app/code/Magento/Theme/Test/Unit/Controller/Adminhtml/System/Design/Theme/UploadJsTest.php
@@ -63,22 +63,22 @@ public function testExecuteWithoutTheme()
->expects($this->at(0))
->method('get')
->with(\Magento\Theme\Model\Uploader\Service::class)
- ->WillReturn($this->serviceModel);
+ ->willReturn($this->serviceModel);
$this->_objectManagerMock
->expects($this->at(1))
->method('get')
->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class)
- ->WillReturn($this->themeFactory);
+ ->willReturn($this->themeFactory);
$this->_objectManagerMock
->expects($this->at(2))
->method('get')
->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class)
- ->WillReturn($this->customizationJs);
+ ->willReturn($this->customizationJs);
$this->_objectManagerMock
->expects($this->at(3))
->method('get')
->with(\Magento\Framework\Json\Helper\Data::class)
- ->WillReturn($this->jsonHelper);
+ ->willReturn($this->jsonHelper);
$this->themeFactory->expects($this->once())
->method('create')
@@ -107,21 +107,21 @@ public function testExecuteWithException()
$this->_objectManagerMock->expects($this->at(0))
->method('get')
->with(\Magento\Theme\Model\Uploader\Service::class)
- ->WillReturn($this->serviceModel);
+ ->willReturn($this->serviceModel);
$this->_objectManagerMock->expects($this->at(1))
->method('get')
->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class)
- ->WillReturn($this->themeFactory);
+ ->willReturn($this->themeFactory);
$this->_objectManagerMock
->expects($this->at(2))
->method('get')
->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class)
- ->WillReturn($this->customizationJs);
+ ->willReturn($this->customizationJs);
$this->_objectManagerMock
->expects($this->at(4))
->method('get')
->with(\Magento\Framework\Json\Helper\Data::class)
- ->WillReturn($this->jsonHelper);
+ ->willReturn($this->jsonHelper);
$this->themeFactory->expects($this->once())
->method('create')
@@ -172,19 +172,19 @@ public function testExecute()
$this->_objectManagerMock->expects($this->at(0))
->method('get')
->with(\Magento\Theme\Model\Uploader\Service::class)
- ->WillReturn($this->serviceModel);
+ ->willReturn($this->serviceModel);
$this->_objectManagerMock->expects($this->at(1))
->method('get')
->with(\Magento\Framework\View\Design\Theme\FlyweightFactory::class)
- ->WillReturn($this->themeFactory);
+ ->willReturn($this->themeFactory);
$this->_objectManagerMock->expects($this->at(2))
->method('get')
->with(\Magento\Framework\View\Design\Theme\Customization\File\Js::class)
- ->WillReturn($this->customizationJs);
+ ->willReturn($this->customizationJs);
$this->_objectManagerMock->expects($this->at(4))
->method('get')
->with(\Magento\Framework\Json\Helper\Data::class)
- ->WillReturn($this->jsonHelper);
+ ->willReturn($this->jsonHelper);
$this->themeFactory->expects($this->once())
->method('create')
diff --git a/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php b/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php
index 16cde3cfe2c06..1cc0cd54c60eb 100644
--- a/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php
+++ b/app/code/Magento/User/Test/Unit/Model/ResourceModel/UserTest.php
@@ -330,7 +330,7 @@ public function testDeleteFromRole()
$roleId = 44;
$methodUserMock->expects($this->once())->method('getUserId')->willReturn($uid);
$this->resourceMock->expects($this->atLeastOnce())->method('getConnection')->willReturn($this->dbAdapterMock);
- $methodUserMock->expects($this->atleastOnce())->method('getRoleId')->willReturn($roleId);
+ $methodUserMock->expects($this->atLeastOnce())->method('getRoleId')->willReturn($roleId);
$this->dbAdapterMock->expects($this->once())->method('delete');
$this->assertInstanceOf(
diff --git a/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php b/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php
index 1e2947084ee6b..4b04507dcedc0 100644
--- a/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php
+++ b/lib/internal/Magento/Framework/App/Test/Unit/BootstrapTest.php
@@ -135,7 +135,7 @@ public function testCreateFilesystemDriverPool()
);
/** @var \Magento\Framework\Filesystem\DriverPool $result */
$this->assertInstanceOf(\Magento\Framework\Filesystem\DriverPool::class, $result);
- $this->assertInstanceof($driverClass, $result->getDriver('custom'));
+ $this->assertInstanceOf($driverClass, $result->getDriver('custom'));
}
public function testGetParams()
diff --git a/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php b/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php
index 801d99373bc50..15ceb0c6c2755 100644
--- a/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php
+++ b/lib/internal/Magento/Framework/Composer/Test/Unit/DependencyCheckerTest.php
@@ -69,7 +69,7 @@ function ($input, $buffer) {
$buffer->writeln($output);
}
);
- $composerApp->Expects($this->at(6))->method('run')->willReturnCallback(
+ $composerApp->expects($this->at(6))->method('run')->willReturnCallback(
function ($input, $buffer) {
$output = 'magento/package-d requires magento/package-c (1.0)' . PHP_EOL .
'magento/project-community-edition requires magento/package-a (1.0)' . PHP_EOL;
diff --git a/lib/internal/Magento/Framework/File/Size.php b/lib/internal/Magento/Framework/File/Size.php
index 6f48024f71c16..c259069637293 100644
--- a/lib/internal/Magento/Framework/File/Size.php
+++ b/lib/internal/Magento/Framework/File/Size.php
@@ -36,7 +36,7 @@ class Size
*/
public function getPostMaxSize()
{
- return $this->_iniget('post_max_size');
+ return $this->_iniGet('post_max_size');
}
/**
@@ -46,7 +46,7 @@ public function getPostMaxSize()
*/
public function getUploadMaxSize()
{
- return $this->_iniget('upload_max_filesize');
+ return $this->_iniGet('upload_max_filesize');
}
/**
diff --git a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php
index 93274b1d063bf..ea21faf3f340d 100644
--- a/lib/internal/Magento/Framework/Image/Adapter/Gd2.php
+++ b/lib/internal/Magento/Framework/Image/Adapter/Gd2.php
@@ -106,7 +106,7 @@ protected function _getImageNeedMemorySize($file)
}
return round(
- ($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + Pow(2, 16)) * 1.65
+ ($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $imageInfo['channels'] / 8 + pow(2, 16)) * 1.65
);
}
@@ -426,7 +426,7 @@ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity =
imagecolortransparent($newWatermark, $col);
imagefilledrectangle($newWatermark, 0, 0, $this->getWatermarkWidth(), $this->getWatermarkHeight(), $col);
imagealphablending($newWatermark, true);
- imageSaveAlpha($newWatermark, true);
+ imagesavealpha($newWatermark, true);
imagecopyresampled(
$newWatermark,
$watermark,
@@ -451,7 +451,7 @@ public function watermark($imagePath, $positionX = 0, $positionY = 0, $opacity =
imagecolortransparent($newWatermark, $col);
imagefilledrectangle($newWatermark, 0, 0, $this->_imageSrcWidth, $this->_imageSrcHeight, $col);
imagealphablending($newWatermark, true);
- imageSaveAlpha($newWatermark, true);
+ imagesavealpha($newWatermark, true);
imagecopyresampled(
$newWatermark,
$watermark,
@@ -669,7 +669,7 @@ private function imageDestroy()
private function _saveAlpha($imageHandler)
{
$background = imagecolorallocate($imageHandler, 0, 0, 0);
- ImageColorTransparent($imageHandler, $background);
+ imagecolortransparent($imageHandler, $background);
imagealphablending($imageHandler, false);
imagesavealpha($imageHandler, true);
}
diff --git a/lib/internal/Magento/Framework/Indexer/Action/Base.php b/lib/internal/Magento/Framework/Indexer/Action/Base.php
index 11cf1cec62636..636335192cbc5 100644
--- a/lib/internal/Magento/Framework/Indexer/Action/Base.php
+++ b/lib/internal/Magento/Framework/Indexer/Action/Base.php
@@ -221,7 +221,7 @@ protected function prepareDataSource(array $ids = [])
{
return !count($ids)
? $this->createResultCollection()
- : $this->createResultCollection()->addFieldToFilter($this->getPrimaryResource()->getIdFieldname(), $ids);
+ : $this->createResultCollection()->addFieldToFilter($this->getPrimaryResource()->getIdFieldName(), $ids);
}
/**
diff --git a/lib/internal/Magento/Framework/RequireJs/Config.php b/lib/internal/Magento/Framework/RequireJs/Config.php
index 08131b2cccea3..ae45e29f38911 100644
--- a/lib/internal/Magento/Framework/RequireJs/Config.php
+++ b/lib/internal/Magento/Framework/RequireJs/Config.php
@@ -157,7 +157,7 @@ public function getConfig()
$customConfigFiles = $this->fileSource->getFiles($this->design->getDesignTheme(), self::CONFIG_FILE_NAME);
foreach ($customConfigFiles as $file) {
/** @var $fileReader \Magento\Framework\Filesystem\File\Read */
- $fileReader = $this->readFactory->create($file->getFileName(), DriverPool::FILE);
+ $fileReader = $this->readFactory->create($file->getFilename(), DriverPool::FILE);
$config = $fileReader->readAll($file->getName());
$distributedConfig .= str_replace(
['%config%', '%context%'],
diff --git a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php
index 17a320164dad3..9ba7833a355d7 100644
--- a/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php
+++ b/lib/internal/Magento/Framework/View/Element/UiComponent/Config/FileCollector/AggregatedFileCollector.php
@@ -75,7 +75,7 @@ public function collectFiles($searchPattern = null)
}
$files = $this->collectorAggregated->getFiles($this->design->getDesignTheme(), $searchPattern);
foreach ($files as $file) {
- $fullFileName = $file->getFileName();
+ $fullFileName = $file->getFilename();
$fileDir = dirname($fullFileName);
$fileName = basename($fullFileName);
$dirRead = $this->readFactory->create($fileDir);
diff --git a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php
index fe5c94ed21b30..5a19f4f0b9b58 100644
--- a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php
+++ b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php
@@ -672,7 +672,7 @@ public function getFileLayoutUpdatesXml()
$result = $this->_loadXmlString($result);
} else {
$result = $this->_loadFileLayoutUpdatesXml();
- $this->_saveCache($result->asXml(), $cacheId);
+ $this->_saveCache($result->asXML(), $cacheId);
}
$this->layoutUpdatesCache = $result;
return $result;
diff --git a/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php b/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php
index 8328f03fd6db5..71a2951b40420 100644
--- a/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php
+++ b/lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php
@@ -138,6 +138,6 @@ private function setMetadata($pageConfigStructure, $node)
$metadataName = $node->getAttribute('name');
}
- $pageConfigStructure->setMetaData($metadataName, $node->getAttribute('content'));
+ $pageConfigStructure->setMetadata($metadataName, $node->getAttribute('content'));
}
}
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php
index 4515a29c65e4f..909748722a081 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Element/Html/Link/CurrentTest.php
@@ -57,7 +57,7 @@ public function testIsCurrentIfIsset()
/** @var \Magento\Framework\View\Element\Html\Link\Current $link */
$link = $this->_objectManager->getObject(\Magento\Framework\View\Element\Html\Link\Current::class);
$link->setCurrent(true);
- $this->assertTrue($link->IsCurrent());
+ $this->assertTrue($link->isCurrent());
}
public function testIsCurrent()
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php b/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php
index c0300164e26fe..f8a8939bbfe36 100755
--- a/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/LayoutTest.php
@@ -273,7 +273,7 @@ public function testGenerateXml()
->with($this->equalTo([]))
->will($this->returnSelf());
$this->assertSame($this->model, $this->model->generateXml());
- $this->assertSame('123', $this->model->getNode('some_update')->asXml());
+ $this->assertSame('123', $this->model->getNode('some_update')->asXML());
}
public function testGetChildBlock()
diff --git a/setup/src/Magento/Setup/Model/PhpReadinessCheck.php b/setup/src/Magento/Setup/Model/PhpReadinessCheck.php
index c2bdafa8df82e..2c4967c4c2ffd 100644
--- a/setup/src/Magento/Setup/Model/PhpReadinessCheck.php
+++ b/setup/src/Magento/Setup/Model/PhpReadinessCheck.php
@@ -286,7 +286,7 @@ private function checkPopulateRawPostSetting()
$data = [];
$error = false;
- $iniSetting = intVal(ini_get('always_populate_raw_post_data'));
+ $iniSetting = intval(ini_get('always_populate_raw_post_data'));
$checkVersionConstraint = $this->versionParser->parseConstraints('~5.6.0');
$normalizedPhpVersion = $this->getNormalizedCurrentPhpVersion(PHP_VERSION);
@@ -302,7 +302,7 @@ private function checkPopulateRawPostSetting()
Please open your php.ini file and set always_populate_raw_post_data to -1.
If you need more help please call your hosting provider.',
PHP_VERSION,
- intVal(ini_get('always_populate_raw_post_data'))
+ intval(ini_get('always_populate_raw_post_data'))
);
$data['always_populate_raw_post_data'] = [