Skip to content

Commit 304addb

Browse files
committed
MC-33066: Add PHP 7.4 to composer.json files
- PHP 7.4 compatibility fixes
1 parent 6519680 commit 304addb

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

app/code/Magento/SalesRule/Test/Unit/Model/ResourceModel/Report/CollectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ public function testApplyRulesFilterWithRulesList()
163163

164164
$this->selectMock->expects($this->at(3))
165165
->method('where')
166-
->with($this->equalTo(implode([
166+
->with($this->equalTo(implode(' OR ', [
167167
'test_1',
168168
'test_2',
169-
], ' OR ')));
169+
])));
170170

171171
$ruleMock = $this->getRuleMock();
172172
$ruleMock->expects($this->once())

app/code/Magento/Wishlist/Model/LocaleQuantityProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(
4343
public function process($qty)
4444
{
4545
$this->localFilter->setOptions(['locale' => $this->localeResolver->getLocale()]);
46-
$qty = $this->localFilter->filter((double)$qty);
46+
$qty = $this->localFilter->filter($qty);
4747
if ($qty < 0) {
4848
$qty = null;
4949
}

lib/internal/Magento/Framework/App/AreaList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function getCodeByFrontName($frontName)
7272
$resolver = $this->_resolverFactory->create($areaInfo['frontNameResolver']);
7373
$areaInfo['frontName'] = $resolver->getFrontName(true);
7474
}
75-
if ($areaInfo['frontName'] == $frontName) {
75+
if (isset($areaInfo['frontName']) && $areaInfo['frontName'] == $frontName) {
7676
return $areaCode;
7777
}
7878
}

lib/internal/Magento/Framework/DB/Sql/UnionExpression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __toString()
5252
$parts[] = $part;
5353
}
5454
}
55-
$sql = implode($parts, $this->type);
55+
$sql = implode($this->type, $parts);
5656
if ($this->pattern) {
5757
return sprintf($this->pattern, $sql);
5858
}

lib/internal/Magento/Framework/MessageQueue/BatchConsumer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ private function runDaemonMode(QueueInterface $queue, MergerInterface $merger)
151151
*/
152152
private function run(QueueInterface $queue, MergerInterface $merger, $maxNumberOfMessages)
153153
{
154-
$count = $maxNumberOfMessages
154+
$count = ($maxNumberOfMessages
155155
? $maxNumberOfMessages
156-
: $this->configuration->getMaxMessages() ?: 1;
156+
: $this->configuration->getMaxMessages()) ?: 1;
157157
$transactionCallback = $this->getTransactionCallback($queue, $merger);
158158

159159
if ($this->batchSize) {

lib/internal/Magento/Framework/Webapi/Rest/Response/Renderer/Xml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected function _formatData($data, $isRoot = false)
8888
} else {
8989
$data = (array)$data;
9090
}
91-
$isAssoc = !preg_match('/^\d+$/', implode(array_keys($data), ''));
91+
$isAssoc = !preg_match('/^\d+$/', implode('', array_keys($data)));
9292

9393
$formattedData = [];
9494
foreach ($data as $key => $value) {

0 commit comments

Comments
 (0)