Skip to content

Commit

Permalink
Merge pull request #1453 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
[EngCom] Public Pull Requests
 - MAGETWO-72260: Remove unnecessary comment. #10759
 - MAGETWO-72259: phpDocumentor Return tag must be an int #10760
 - MAGETWO-72258: Fix minor type "consturctor" > "constructor" #10755
 - MAGETWO-72226: Fix for translated attribute label comparisson. #10739
 - MAGETWO-71896: Static versioning and styles minification break email fonts styles #8241 #10638
  • Loading branch information
ishakhsuvarov authored Sep 4, 2017
2 parents e05217d + 4271168 commit c2810e0
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ public function getProductAttributeValue($product, $attribute)
['select', 'boolean', 'multiselect']
)
) {
//$value = $attribute->getSource()->getOptionText($product->getData($attribute->getAttributeCode()));
$value = $attribute->getFrontend()->getValue($product);
} else {
$value = $product->getData($attribute->getAttributeCode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if ($_attributeType && $_attributeType == 'text') {

<?php if ($_attributeValue): ?>
<div class="product attribute <?= /* @escapeNotVerified */ $_className ?>">
<?php if ($_attributeLabel != 'none'): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
<?php if ($_attributeLabel != __('none')): ?><strong class="type"><?= /* @escapeNotVerified */ $_attributeLabel ?></strong><?php endif; ?>
<div class="value" <?= /* @escapeNotVerified */ $_attributeAddAttribute ?>><?= /* @escapeNotVerified */ $_attributeValue ?></div>
</div>
<?php endif; ?>
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public function applyInlineCssDataProvider()
'<html><head><style type="text/css">div { color: #111; }</style></head><p></p></html>',
'p { color: #000 }',
[
'<head><style type="text/css">div { color: #111; }</style></head>',
'<style type="text/css">div { color: #111; }</style>',
'<p style="color: #000;"></p>',
],
],
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Sales/Model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ public function getTracksCollection()
*/
public function hasInvoices()
{
return $this->getInvoiceCollection()->count();
return (bool)$this->getInvoiceCollection()->count();
}

/**
Expand All @@ -1784,7 +1784,7 @@ public function hasInvoices()
*/
public function hasShipments()
{
return $this->getShipmentsCollection()->count();
return (bool)$this->getShipmentsCollection()->count();
}

/**
Expand All @@ -1794,7 +1794,7 @@ public function hasShipments()
*/
public function hasCreditmemos()
{
return $this->getCreditmemosCollection()->count();
return (bool)$this->getCreditmemosCollection()->count();
}

/**
Expand Down
12 changes: 6 additions & 6 deletions app/code/Magento/Ui/view/base/web/js/lib/core/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ define([
* Creates constructor function which allows
* initialization without usage of a 'new' operator.
*
* @param {Object} protoProps - Prototypal propeties of a new consturctor.
* @param {Function} consturctor
* @returns {Function} Created consturctor.
* @param {Object} protoProps - Prototypal propeties of a new constructor.
* @param {Function} constructor
* @returns {Function} Created constructor.
*/
function createConstructor(protoProps, consturctor) {
var UiClass = consturctor;
function createConstructor(protoProps, constructor) {
var UiClass = constructor;

if (!UiClass) {

Expand Down Expand Up @@ -61,7 +61,7 @@ define([
Class = createConstructor({

/**
* Entry point to the initialization of consturctors' instance.
* Entry point to the initialization of constructor's instance.
*
* @param {Object} [options={}]
* @returns {Class} Chainable.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"composer/composer": "1.4.1",
"monolog/monolog": "^1.17",
"oyejorge/less.php": "~1.7.0",
"pelago/emogrifier": "0.1.1",
"pelago/emogrifier": "1.2.0",
"tubalmartin/cssmin": "4.1.0",
"magento/magento-composer-installer": ">=0.1.11",
"braintree/braintree_php": "3.22.0",
Expand Down
24 changes: 14 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,12 @@ public function testGetFilesEmogrifier($htmlFilePath, $cssFilePath, $cssExpected
$emogrifier->setCss($css);
$emogrifier->setHtml($html);
$result = $emogrifier->emogrify();

/**
* Tests a bug in the library where there's no spaces to CSS string before passing to Emogrifier
* to fix known parsing issue with library.
* This test should will fail when this bug is fixed in the library and we should fix the adapter.
* https://github.com/jjriv/emogrifier/issues/370
* This test was implemented for the issue which existed in the older version of Emogrifier.
* Test was updated, as the library got updated as well.
*/
$this->assertNotContains($cssExpected, $result);
$this->assertContains($cssExpected, $result);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ public function setHtml($html)
*/
public function setCss($css)
{
/**
* Adds space to CSS string before passing to Emogrifier to fix known parsing issue with library.
* https://github.com/jjriv/emogrifier/issues/370
*/
$cssWithAddedSpaces = preg_replace('#([\{\}>])#i', ' $1 ', $css);

$this->emogrifier->setCss($cssWithAddedSpaces);
$this->emogrifier->setCss($css);
}

/**
Expand Down

0 comments on commit c2810e0

Please sign in to comment.