Skip to content

Commit 32aefa9

Browse files
committed
ACP2E-3862: Partial update of copyrights for CE for file types 'php', 'phtml', 'html', 'js'
1 parent e212bac commit 32aefa9

File tree

13 files changed

+58
-33
lines changed

13 files changed

+58
-33
lines changed

app/code/Magento/AdminAnalytics/Controller/Adminhtml/Config/DisableAdminUsage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function markUserNotified(): ResultInterface
9191
public function execute()
9292
{
9393
$this->disableAdminUsage();
94-
$this->markUserNotified();
94+
return $this->markUserNotified();
9595
}
9696

9797
/**

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ public function execute()
2222
__('Messages Inbox')
2323
);
2424
$this->_view->getPage()->getConfig()->getTitle()->prepend(__('Notifications'));
25-
$this->_view->renderLayout();
25+
return $this->_view->renderLayout();
2626
}
2727
}

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
use Magento\Framework\Controller\ResultFactory;
99

10+
/**
11+
* @SuppressWarnings(PHPMD.AllPurposeAction)
12+
*/
1013
class ListAction extends \Magento\Backend\App\AbstractAction
1114
{
1215
/**

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages.phtml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,48 @@
44
* All Rights Reserved.
55
*/
66

7-
/** @var $block \Magento\AdminNotification\Block\System\Messages */
7+
/**
8+
* @var \Magento\AdminNotification\Block\System\Messages $block
9+
* @var \Magento\Framework\Escaper $escaper
10+
*/
811
?>
912

10-
<?php $lastCritical = $block->getLastCritical();?>
13+
<?php
14+
$lastCritical = $block->getLastCritical();
15+
?>
1116
<div id="system_messages"
12-
class="message-system<?php if ($lastCritical) : ?>
13-
message-system-unread<?php endif; ?>">
17+
class="message-system<?php if ($lastCritical):?>
18+
message-system-unread<?php endif;?>">
1419
<div class="message-system-inner">
1520
<?php if ($lastCritical) : ?>
1621
<ul class="message-system-list">
1722
<li class="message message-warning error">
18-
<?= $block->escapeHtml($lastCritical->getText()) ?>
23+
<?= $escaper->escapeHtml($lastCritical->getText()) ?>
1924
</li>
2025
</ul>
2126
<?php endif; ?>
2227
<div class="message-system-short">
2328
<span class="message-system-short-label">
24-
<?= $block->escapeHtml(__('System Messages:')) ?>
29+
<?= $escaper->escapeHtml(__('System Messages:'))?>
2530
</span>
2631

2732
<?php if ($block->getCriticalCount()) : ?>
2833
<div class="message message-warning error">
29-
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Critical System Messages')) ?>">
34+
<a class="message-link" href="#" title="<?= $escaper->escapeHtml(__('Critical System Messages')) ?>">
3035
<?= (int) $block->getCriticalCount() ?>
3136
</a>
3237
</div>
3338
<?php endif; ?>
3439

3540
<?php if ($block->getMajorCount()) : ?>
3641
<div class="message message-warning warning">
37-
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Major System Messages')) ?>">
42+
<a class="message-link" href="#" title="<?= $escaper->escapeHtml(__('Major System Messages')) ?>">
3843
<?= (int) $block->getMajorCount() ?>
3944
</a>
4045
</div>
4146
<?php endif; ?>
4247
</div>
43-
<div id="message-system-all" title="<?= $block->escapeHtml(__('System messages')) ?>" data-mage-init='<?= $block->escapeHtml($block->getSystemMessageDialogJson()) ?>'></div>
48+
<div id="message-system-all" title="<?= $escaper->escapeHtml(__('System messages')) ?>"
49+
data-mage-init='<?= $escaper->escapeHtml($block->getSystemMessageDialogJson()) ?>'></div>
4450
</div>
4551
</div>

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
* All Rights Reserved.
55
*/
66

7-
/** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */
8-
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
7+
/**
8+
* @var \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup $block
9+
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
10+
* @var \Magento\Framework\Escaper $escaper
11+
*/
912
?>
1013

1114
<div id="system_messages_list" data-role="system_messages_list"
12-
title="<?= $block->escapeHtmlAttr($block->getPopupTitle()) ?>">
15+
title="<?= $escaper->escapeHtmlAttr($block->getPopupTitle()) ?>">
1316
<ul class="message-system-list messages">
1417
<?php foreach ($block->getUnreadMessages() as $message): ?>
1518
<li class="message message-warning <?= $block->escapeHtmlAttr($block->getItemClass($message)) ?>">
16-
<?= $block->escapeHtml($message->getText()) ?>
19+
<?= $escaper->escapeHtml($message->getText()) ?>
1720
</li>
1821
<?php endforeach;?>
1922
</ul>

app/code/Magento/AdminNotification/view/adminhtml/templates/toolbar_entry.phtml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
* All Rights Reserved.
55
*/
66
// phpcs:disable Generic.Files.LineLength
7-
/** @var $block \Magento\AdminNotification\Block\ToolbarEntry */
7+
/**
8+
* @var \Magento\AdminNotification\Block\ToolbarEntry $block
9+
* @var \Magento\Framework\Escaper $escaper
10+
*/
811
$notificationCount = $block->getUnreadNotificationCount();
912
$notificationCounterMax = $block->getNotificationCounterMax();
1013
?>
@@ -14,67 +17,69 @@
1417
data-notification-count="<?= (int)$notificationCount ?>">
1518
<?php if ($notificationCount > 0): ?>
1619
<a
17-
href="<?= $block->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
20+
href="<?= $escaper->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
1821
class="notifications-action admin__action-dropdown"
1922
data-mage-init='{"dropdown":{}}'
20-
title="<?= $block->escapeHtmlAttr(__('Notifications')) ?>"
23+
title="<?= $escaper->escapeHtmlAttr(__('Notifications')) ?>"
2124
data-toggle="dropdown">
2225
<span class="notifications-counter">
2326
<?= /* @noEscape */ ($notificationCount > $notificationCounterMax) ? (int)$notificationCounterMax . '+' : (int)$notificationCount ?>
2427
</span>
2528
</a>
2629
<ul
2730
class="admin__action-dropdown-menu"
28-
data-mark-as-read-url="<?= $block->escapeUrl($block->getUrl('adminhtml/notification/ajaxMarkAsRead')) ?>">
31+
data-mark-as-read-url="<?= $escaper->escapeUrl($block->getUrl('adminhtml/notification/ajaxMarkAsRead')) ?>">
2932
<?php foreach ($block->getLatestUnreadNotifications() as $notification): ?>
3033
<?php /** @var $notification \Magento\AdminNotification\Model\Inbox */ ?>
3134
<li class="notifications-entry<?php if ($notification->getSeverity() == 1): ?> notifications-critical<?php endif; ?>"
32-
data-notification-id="<?= $block->escapeHtmlAttr($notification->getId()) ?>"
35+
data-notification-id="<?= $escaper->escapeHtmlAttr($notification->getId()) ?>"
3336
data-notification-severity="<?php if ($notification->getSeverity() == 1): ?>1<?php endif; ?>">
3437
<?php
3538
$notificationDescription = $notification->getDescription() ?? '';
3639
$notificationDescriptionLength = $block->getNotificationDescriptionLength();
3740
?>
3841
<strong class="notifications-entry-title">
39-
<?= $block->escapeHtml($notification->getTitle()) ?>
42+
<?= $escaper->escapeHtml($notification->getTitle()) ?>
4043
</strong>
4144
<?php if (strlen($notificationDescription) > $notificationDescriptionLength): ?>
4245
<p class="notifications-entry-description _cutted">
4346
<span class="notifications-entry-description-start">
44-
<?= $block->escapeHtml(substr($notificationDescription, 0, $notificationDescriptionLength)) ?>
47+
<?= $escaper->escapeHtml(substr($notificationDescription, 0, $notificationDescriptionLength)) ?>
4548
</span>
4649
<span class="notifications-entry-description-end">
47-
<?= $block->escapeHtml(substr($notificationDescription, $notificationDescriptionLength)) ?>
50+
<?= $escaper->escapeHtml(substr($notificationDescription, $notificationDescriptionLength)) ?>
4851
</span>
4952
</p>
5053
<?php else: ?>
5154
<p class="notifications-entry-description">
52-
<?= $block->escapeHtml($notificationDescription) ?>
55+
<?= $escaper->escapeHtml($notificationDescription) ?>
5356
</p>
5457
<?php endif; ?>
5558
<time class="notifications-entry-time">
56-
<?= $block->escapeHtml($block->formatNotificationDate($notification->getDateAdded())) ?>
59+
<?= $escaper->escapeHtml($block->formatNotificationDate($notification->getDateAdded())) ?>
5760
</time>
5861
<button
5962
type="button"
6063
class="notifications-close"
61-
title="<?= $block->escapeHtmlAttr(__('Close')) ?>"
64+
title="<?= $escaper->escapeHtmlAttr(__('Close')) ?>"
6265
></button>
6366
</li>
6467
<?php endforeach; ?>
6568
<li class="notifications-entry notifications-entry-last">
6669
<a
67-
href="<?= $block->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
70+
href="<?= $escaper->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
6871
class="action-tertiary action-more">
69-
<?= $block->escapeHtml(__('See All (')) ?><span class="notifications-counter"><?= (int)$notificationCount ?></span><?= $block->escapeHtml(__(' unread)')) ?>
72+
<?= $escaper->escapeHtml(__('See All (')) ?><span
73+
class="notifications-counter"><?= (int)$notificationCount ?></span>
74+
<?= $escaper->escapeHtml(__(' unread)')) ?>
7075
</a>
7176
</li>
7277
</ul>
7378
<?php else: ?>
7479
<a
7580
class="notifications-action admin__action-dropdown"
76-
href="<?= $block->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
77-
title="<?= $block->escapeHtmlAttr(__('Notifications')) ?>">
81+
href="<?= $escaper->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
82+
title="<?= $escaper->escapeHtmlAttr(__('Notifications')) ?>">
7883
</a>
7984
<?php endif; ?>
8085
</div>

app/code/Magento/Analytics/Controller/Adminhtml/Subscription/Retry.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
/**
1717
* Retry subscription to Magento BI Advanced Reporting.
18+
* @SuppressWarnings(PHPMD.AllPurposeAction)
1819
*/
1920
class Retry extends Action
2021
{

app/code/Magento/Analytics/Model/FileInfoManager.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ private function encodeValue($value)
118118
*/
119119
private function decodeValue($value)
120120
{
121+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
121122
return base64_decode($value);
122123
}
123124
}

app/code/Magento/Analytics/Model/FileRecorder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ private function removeOldFile(FileInfo $fileInfo, WriteInterface $directory)
125125
}
126126

127127
$directory->delete($fileInfo->getPath());
128-
128+
// phpcs:ignore Magento2.Functions.DiscouragedFunction
129129
$directoryName = dirname($fileInfo->getPath());
130130
if ($directoryName !== '.') {
131131
$directory->delete($directoryName);

app/code/Magento/Analytics/Model/StoreConfigurationProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ public function __construct(
4949

5050
/**
5151
* Generates report using config paths from di.xml
52+
*
5253
* For each website and store
54+
*
5355
* @return \IteratorIterator
5456
*/
5557
public function getReport()
@@ -58,6 +60,7 @@ public function getReport()
5860

5961
/** @var WebsiteInterface $website */
6062
foreach ($this->storeManager->getWebsites() as $website) {
63+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
6164
$configReport = array_merge(
6265
$this->generateReportForScope(ScopeInterface::SCOPE_WEBSITES, $website->getId()),
6366
$configReport
@@ -66,6 +69,7 @@ public function getReport()
6669

6770
/** @var StoreInterface $store */
6871
foreach ($this->storeManager->getStores() as $store) {
72+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
6973
$configReport = array_merge(
7074
$this->generateReportForScope(ScopeInterface::SCOPE_STORES, $store->getId()),
7175
$configReport

0 commit comments

Comments
 (0)