Skip to content

Commit c0a2ca5

Browse files
committed
#34505: fixes after CR
1 parent 020fb1e commit c0a2ca5

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

lib/internal/Magento/Framework/Stdlib/DateTime/Timezone.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ public function scopeTimeStamp($scope = null)
264264
*/
265265
public function isScopeDateInInterval($scope, $dateFrom = null, $dateTo = null)
266266
{
267-
$dateFrom = $dateFrom ?: '';
268-
$dateTo = $dateTo ?: '';
267+
$dateFrom = $dateFrom ?? '';
268+
$dateTo = $dateTo ?? '';
269269
if (!$scope instanceof ScopeInterface) {
270270
$scope = $this->_scopeResolver->getScope($scope);
271271
}
@@ -284,6 +284,9 @@ public function isScopeDateInInterval($scope, $dateFrom = null, $dateTo = null)
284284

285285
/**
286286
* @inheritdoc
287+
*
288+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
289+
* @SuppressWarnings(PHPMD.NPathComplexity)
287290
*/
288291
public function formatDateTime(
289292
$date,
@@ -307,9 +310,9 @@ public function formatDateTime(
307310
}
308311

309312
$formatter = $this->dateFormatterFactory->create(
310-
(string) ($locale ?: $this->_localeResolver->getLocale()),
311-
(int) $dateType,
312-
(int) $timeType,
313+
(string) $locale ?: $this->_localeResolver->getLocale(),
314+
(int) $dateType ?: \IntlDateFormatter::SHORT,
315+
(int) $timeType ?: \IntlDateFormatter::SHORT,
313316
null,
314317
false
315318
);

lib/internal/Magento/Framework/Url.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,9 +925,7 @@ private function createUrl($routePath = null, array $routeParams = null)
925925
unset($routeParams['_query']);
926926
}
927927

928-
if (isset($routeParams['_nosid'])) {
929-
unset($routeParams['_nosid']);
930-
}
928+
unset($routeParams['_nosid']);
931929
$url = $this->getRouteUrl($routePath, $routeParams);
932930

933931
/**

0 commit comments

Comments
 (0)