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 @@ -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)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
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 @@ -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 @@ -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];
}
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
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 @@ -817,7 +817,7 @@ public function apply()

$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 @@ -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 @@ -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',
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 @@ -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'] : '';

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 @@ -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());
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 @@ -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')
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/Magento/Framework/File/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Size
*/
public function getPostMaxSize()
{
return $this->_iniget('post_max_size');
return $this->_iniGet('post_max_size');
}

/**
Expand All @@ -46,7 +46,7 @@ public function getPostMaxSize()
*/
public function getUploadMaxSize()
{
return $this->_iniget('upload_max_filesize');
return $this->_iniGet('upload_max_filesize');
}

/**
Expand Down
8 changes: 4 additions & 4 deletions lib/internal/Magento/Framework/Image/Adapter/Gd2.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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);
}
Expand Down
Loading