File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
app/code/Magento/Sales/Model
lib/internal/Magento/Framework/View Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -1770,7 +1770,7 @@ public function getTracksCollection()
1770
1770
*/
1771
1771
public function hasInvoices ()
1772
1772
{
1773
- return $ this ->getInvoiceCollection ()->count ();
1773
+ return boolval ( $ this ->getInvoiceCollection ()->count () );
1774
1774
}
1775
1775
1776
1776
/**
@@ -1780,7 +1780,7 @@ public function hasInvoices()
1780
1780
*/
1781
1781
public function hasShipments ()
1782
1782
{
1783
- return $ this ->getShipmentsCollection ()->count ();
1783
+ return boolval ( $ this ->getShipmentsCollection ()->count () );
1784
1784
}
1785
1785
1786
1786
/**
@@ -1790,7 +1790,7 @@ public function hasShipments()
1790
1790
*/
1791
1791
public function hasCreditmemos ()
1792
1792
{
1793
- return $ this ->getCreditmemosCollection ()->count ();
1793
+ return boolval ( $ this ->getCreditmemosCollection ()->count () );
1794
1794
}
1795
1795
1796
1796
/**
Original file line number Diff line number Diff line change @@ -131,8 +131,8 @@ public function minify($file)
131
131
'#(?<!:| \\\\| \'|")//(?!\s*\<\!\[)(?!\s*]]\>)[^\n\r]*# ' ,
132
132
'' ,
133
133
preg_replace (
134
- '#(?<!:| \'|")//[^\n\r]*(\s\ ?\>)# ' ,
135
- '$1 ' ,
134
+ '#(?<!:| \'|")//[^\n\r]*(\?\>)# ' ,
135
+ ' $1 ' ,
136
136
preg_replace (
137
137
'#(?<!:)//[^\n\r]*(\<\?php)[^\n\r]*(\s\?\>)[^\n\r]*# ' ,
138
138
'' ,
Original file line number Diff line number Diff line change @@ -155,6 +155,11 @@ public function testMinify()
155
155
<?php echo '//some.link.com/' ?>
156
156
<em>inline text</em>
157
157
<a href="http://www.<?php echo 'hi' ?>"></a>
158
+ <?php// if ( \$block->getSomeVariable() > 1):?>
159
+ <?php echo \$block->getChildHtml('someChildBlock'); ?>
160
+ <?php //else:?>
161
+ <?php // echo \$block->getChildHtml('anotherChildBlock'); ?>
162
+ <?php // endif; ?>
158
163
</body>
159
164
</html>
160
165
TEXT ;
@@ -178,7 +183,7 @@ public function testMinify()
178
183
}
179
184
});
180
185
//]]>
181
- </script><?php echo "http://some.link.com/" ?> <?php echo "//some.link.com/" ?> <?php echo '//some.link.com/' ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a></body></html>
186
+ </script><?php echo "http://some.link.com/" ?> <?php echo "//some.link.com/" ?> <?php echo '//some.link.com/' ?> <em>inline text</em> <a href="http://www.<?php echo 'hi' ?>"></a> <?php ?> <?php echo \$ block->getChildHtml('someChildBlock'); ?> <?php ?> <?php ?> <?php ?> </body></html>
182
187
TEXT ;
183
188
184
189
$ this ->appDirectoryMock ->expects ($ this ->once ())
You can’t perform that action at this time.
0 commit comments