Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function testRender()
$this->abstractElementMock->expects($this->any())
->method('getComment')
->willReturn('Eastern Standard Time (America/New_York)');
$this->assertRegexp(
$this->assertRegExp(
"/Eastern Standard Time \(America\/New_York\)/",
$this->collectionTimeLabel->render($this->abstractElementMock)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,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)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected function setUp()
->disableOriginalConstructor()
->getMock();

$this->selectHydratorMock = $this->getMockBuilder(selectHydrator::class)
$this->selectHydratorMock = $this->getMockBuilder(SelectHydrator::class)
->disableOriginalConstructor()
->getMock();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,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];
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Braintree/Model/Ui/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function testGetCcTypesMapper($value, $expected)

static::assertEquals(
$expected,
$this->model->getCctypesMapper()
$this->model->getCcTypesMapper()
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/Product/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ public function getResizedImageInfo()
$image = $this->imageAsset->getPath();
}

$imageProperties = $this->getimagesize($image);
$imageProperties = $this->getImageSize($image);

return $imageProperties;
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ protected function _importData()
$optionsToRemove = [];

foreach ($bunch as $rowNumber => $rowData) {
if (isset($optionId, $valueId) && empty($rowData[PRODUCT::COL_STORE_VIEW_CODE])) {
if (isset($optionId, $valueId) && empty($rowData[Product::COL_STORE_VIEW_CODE])) {
$nextOptionId = $optionId;
$nextValueId = $valueId;
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Checkout/Setup/InstallData.php
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface

$connection->commit();
} catch (\Exception $e) {
$connection->rollback();
$connection->rollBack();
throw $e;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ private function _setUpIsAttributeRequired()
*/
$this->_block->setForceUseCustomerAttributes(false);
$this->_block->setForceUseCustomerRequiredAttributes(true);
$this->_block->setObject(new \StdClass());
$this->_block->setObject(new \stdClass());

/**
* The first call to isRequired() is false so that the second if conditional in the other code path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function testBeforeToHtml()
$infoMock->expects($this->once())->method('getMethodInstance')->will($this->returnValue($methodMock));
$this->block->setInfo($infoMock);

$fakeBlock = new \StdClass();
$fakeBlock = new \stdClass();
$this->layout->expects(
$this->any()
)->method(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function testPlaceRequest()
$expectedResult = [
'result' => []
];
$soapResult = new \StdClass();
$soapResult = new \stdClass();

$this->logger->expects(static::at(0))
->method('debug')
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Payment/Test/Unit/Model/InfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function testDecrypt()
*/
public function testSetAdditionalInformationException()
{
$this->info->setAdditionalInformation('object', new \StdClass());
$this->info->setAdditionalInformation('object', new \stdClass());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function testPreventExpressCheckoutEmpty()
$this->_event->setControllerAction(null);
$this->_model->execute($this->_observer);

$this->_event->setControllerAction(new \StdClass());
$this->_event->setControllerAction(new \stdClass());
$this->_model->execute($this->_observer);

$expectedActionName = 'realAction';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/SalesRule/Model/ResourceModel/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 4 additions & 4 deletions app/code/Magento/Shipping/Model/Shipping/Labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ public function requestToShipment(Shipment $orderShipment)
)
);

if (!$admin->getFirstname()
|| !$admin->getLastname()
if (!$admin->getFirstName()
|| !$admin->getLastName()
|| !$storeInfo->getName()
|| !$storeInfo->getPhone()
|| !$originStreet1
Expand Down Expand Up @@ -187,8 +187,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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testGetScope()
*/
public function testGetScopeWithInvalidScope()
{
$scopeMock = new \StdClass();
$scopeMock = new \stdClass();
$this->storeManagerMock
->expects($this->once())
->method('getGroup')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testGetScope()
*/
public function testGetScopeWithInvalidScope()
{
$scopeMock = new \StdClass();
$scopeMock = new \stdClass();
$this->_storeManagerMock
->expects($this->once())
->method('getStore')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testGetScope()
*/
public function testGetScopeWithInvalidScope()
{
$scopeMock = new \StdClass();
$scopeMock = new \stdClass();
$this->_storeManagerMock
->expects($this->once())
->method('getWebsite')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use Magento\Framework\App\Console\MaintenanceModeEnabler;
use Magento\Theme\Console\Command\ThemeUninstallCommand;
use Magento\Theme\Model\Theme\themePackageInfo;
use Magento\Theme\Model\Theme\ThemePackageInfo;
use Magento\Theme\Model\Theme\ThemeUninstaller;
use Magento\Theme\Model\Theme\ThemeDependencyChecker;
use Symfony\Component\Console\Tester\CommandTester;
Expand Down
Loading