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
52 changes: 26 additions & 26 deletions app/code/Magento/Authorizenet/Model/Directpost/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,50 +112,50 @@ public function setDataFromOrder(
sprintf('%.2F', $order->getBaseShippingAmount())
);

//need to use strval() because NULL values IE6-8 decodes as "null" in JSON in JavaScript,
//need to use (string) because NULL values IE6-8 decodes as "null" in JSON in JavaScript,
//but we need "" for null values.
$billing = $order->getBillingAddress();
if (!empty($billing)) {
$this->setXFirstName(strval($billing->getFirstname()))
->setXLastName(strval($billing->getLastname()))
->setXCompany(strval($billing->getCompany()))
->setXAddress(strval($billing->getStreetLine(1)))
->setXCity(strval($billing->getCity()))
->setXState(strval($billing->getRegion()))
->setXZip(strval($billing->getPostcode()))
->setXCountry(strval($billing->getCountryId()))
->setXPhone(strval($billing->getTelephone()))
->setXFax(strval($billing->getFax()))
->setXCustId(strval($billing->getCustomerId()))
->setXCustomerIp(strval($order->getRemoteIp()))
->setXCustomerTaxId(strval($billing->getTaxId()))
->setXEmail(strval($order->getCustomerEmail()))
->setXEmailCustomer(strval($paymentMethod->getConfigData('email_customer')))
->setXMerchantEmail(strval($paymentMethod->getConfigData('merchant_email')));
$this->setXFirstName((string)$billing->getFirstname())
->setXLastName((string)$billing->getLastname())
->setXCompany((string)$billing->getCompany())
->setXAddress((string)$billing->getStreetLine(1))
->setXCity((string)$billing->getCity())
->setXState((string)$billing->getRegion())
->setXZip((string)$billing->getPostcode())
->setXCountry((string)$billing->getCountryId())
->setXPhone((string)$billing->getTelephone())
->setXFax((string)$billing->getFax())
->setXCustId((string)$billing->getCustomerId())
->setXCustomerIp((string)$order->getRemoteIp())
->setXCustomerTaxId((string)$billing->getTaxId())
->setXEmail((string)$order->getCustomerEmail())
->setXEmailCustomer((string)$paymentMethod->getConfigData('email_customer'))
->setXMerchantEmail((string)$paymentMethod->getConfigData('merchant_email'));
}

$shipping = $order->getShippingAddress();
if (!empty($shipping)) {
$this->setXShipToFirstName(
strval($shipping->getFirstname())
(string)$shipping->getFirstname()
)->setXShipToLastName(
strval($shipping->getLastname())
(string)$shipping->getLastname()
)->setXShipToCompany(
strval($shipping->getCompany())
(string)$shipping->getCompany()
)->setXShipToAddress(
strval($shipping->getStreetLine(1))
(string)$shipping->getStreetLine(1)
)->setXShipToCity(
strval($shipping->getCity())
(string)$shipping->getCity()
)->setXShipToState(
strval($shipping->getRegion())
(string)$shipping->getRegion()
)->setXShipToZip(
strval($shipping->getPostcode())
(string)$shipping->getPostcode()
)->setXShipToCountry(
strval($shipping->getCountryId())
(string)$shipping->getCountryId()
);
}

$this->setXPoNum(strval($payment->getPoNumber()));
$this->setXPoNum((string)$payment->getPoNumber());

return $this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected function _getCurrencyBase()
$this->getScopeId()
);
}
return strval($value);
return (string)$value;
}

/**
Expand All @@ -88,7 +88,7 @@ protected function _getCurrencyDefault()
$this->getScopeId()
);
}
return strval($value);
return (string)$value;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getTabTitle()
}

/**
* Returns status flag about this tab can be showen or not
* Returns status flag about this tab can be shown or not
*
* @return true
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Paypal/Controller/Payflow/ReturnUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function execute()
$redirectBlock->setData('goto_success_page', true);
} else {
if ($this->checkPaymentMethod($order)) {
$gotoSection = $this->_cancelPayment(strval($this->getRequest()->getParam('RESPMSG')));
$gotoSection = $this->_cancelPayment((string)$this->getRequest()->getParam('RESPMSG'));
$redirectBlock->setData('goto_section', $gotoSection);
$redirectBlock->setData('error_msg', __('Your payment has been declined. Please try again.'));
} else {
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Quote/Model/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ public function addProduct(
* Error message
*/
if (is_string($cartCandidates) || $cartCandidates instanceof \Magento\Framework\Phrase) {
return strval($cartCandidates);
return (string)$cartCandidates;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private function createProducts(FixtureFactory $fixtureFactory, $productsData)

$products[] = $product;
} elseif ($this->data === null) {
$this->data = strval($productData);
$this->data = (string)$productData;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(FixtureFactory $fixtureFactory, array $params, $data
$id = $this->entity->hasData('id') ? $this->entity->getId() : $this->entity->getPageId();
$this->data = preg_replace('`(%.*?%)`', $id, $data['entity']);
} else {
$this->data = strval($data['entity']);
$this->data = (string)$data['entity'];
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/App/DeploymentConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function resetData()
}

/**
* Check if data from deploy files is avaiable
* Check if data from deploy files is available
*
* @return bool
* @since 100.1.3
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/Magento/Framework/DB/Select/OrderRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ public function render(Select $select, $sql = '')
$order = [];
foreach ($select->getPart(Select::ORDER) as $term) {
if (is_array($term)) {
if (is_numeric($term[0]) && strval(intval($term[0])) == $term[0]) {
if (is_numeric($term[0]) && (string)intval($term[0]) == $term[0]) {
$order[] = (int)trim($term[0]) . ' ' . $term[1];
} else {
$order[] = $this->quote->quoteIdentifier($term[0]) . ' ' . $term[1];
}
} elseif (is_numeric($term) && strval(intval($term)) == $term) {
} elseif (is_numeric($term) && (string)intval($term) == $term) {
$order[] = (int)trim($term);
} else {
$order[] = $this->quote->quoteIdentifier($term);
Expand Down
12 changes: 6 additions & 6 deletions lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ public function getChecked($value)
return;
}
if (!is_array($checked)) {
$checked = [strval($checked)];
$checked = [(string)$checked];
} else {
foreach ($checked as $k => $v) {
$checked[$k] = strval($v);
$checked[$k] = (string)$v;
}
}
if (in_array(strval($value), $checked)) {
if (in_array((string)$value, $checked)) {
return 'checked';
}
return;
Expand All @@ -141,13 +141,13 @@ public function getDisabled($value)
{
if ($disabled = $this->getData('disabled')) {
if (!is_array($disabled)) {
$disabled = [strval($disabled)];
$disabled = [(string)$disabled];
} else {
foreach ($disabled as $k => $v) {
$disabled[$k] = strval($v);
$disabled[$k] = (string)$v;
}
}
if (in_array(strval($value), $disabled)) {
if (in_array((string)$value, $disabled)) {
return 'disabled';
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/Filter/Translit.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $
$convertConfig = $config->getValue('url/convert', 'default');
if ($convertConfig) {
foreach ($convertConfig as $configValue) {
$this->convertTable[strval($configValue['from'])] = strval($configValue['to']);
$this->convertTable[(string)$configValue['from']] = strval($configValue['to']);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ public function render(array $source, array $arguments)
*/
private function keyToPlaceholder($key)
{
return '%' . (is_int($key) ? strval($key + 1) : $key);
return '%' . (is_int($key) ? (string)($key + 1) : $key);
}
}
6 changes: 3 additions & 3 deletions setup/src/Magento/Setup/Console/Command/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class InstallCommand extends AbstractSetupCommand
/**
* List of comma-separated module names. That must be avoided during installation.
* List of comma-separated module names. That must be avoided during installation.
* Avaiable magic param all.
* Available magic param all.
*/
const INPUT_KEY_DISABLE_MODULES = 'disable_modules';

Expand Down Expand Up @@ -166,14 +166,14 @@ protected function configure()
null,
InputOption::VALUE_OPTIONAL,
'List of comma-separated module names. That must be included during installation. '
. 'Avaiable magic param "all".'
. 'Available magic param "all".'
),
new InputOption(
self::INPUT_KEY_DISABLE_MODULES,
null,
InputOption::VALUE_OPTIONAL,
'List of comma-separated module names. That must be avoided during installation. '
. 'Avaiable magic param "all".'
. 'Available magic param "all".'
),
new InputOption(
self::CONVERT_OLD_SCRIPTS_KEY,
Expand Down