Skip to content

Commit

Permalink
ENGCOM-8425: Replace 'static::' with 'self::' when accessing private …
Browse files Browse the repository at this point in the history
…const. #30774
  • Loading branch information
gabrieldagama authored Nov 12, 2020
2 parents 32c4c3e + 9160289 commit effb34a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions app/code/Magento/Backend/Model/Dashboard/Period.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ public function getDatePeriods(): array
public function getPeriodChartUnits(): array
{
return [
static::PERIOD_24_HOURS => static::PERIOD_UNIT_HOUR,
static::PERIOD_7_DAYS => static::PERIOD_UNIT_DAY,
static::PERIOD_1_MONTH => static::PERIOD_UNIT_DAY,
static::PERIOD_1_YEAR => static::PERIOD_UNIT_MONTH,
static::PERIOD_2_YEARS => static::PERIOD_UNIT_MONTH
static::PERIOD_24_HOURS => self::PERIOD_UNIT_HOUR,
static::PERIOD_7_DAYS => self::PERIOD_UNIT_DAY,
static::PERIOD_1_MONTH => self::PERIOD_UNIT_DAY,
static::PERIOD_1_YEAR => self::PERIOD_UNIT_MONTH,
static::PERIOD_2_YEARS => self::PERIOD_UNIT_MONTH
];
}
}
4 changes: 2 additions & 2 deletions app/code/Magento/Backend/ViewModel/ChartDisabled.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct(
public function getConfigUrl(): string
{
return $this->urlBuilder->getUrl(
static::ROUTE_SYSTEM_CONFIG,
self::ROUTE_SYSTEM_CONFIG,
['section' => 'admin', '_fragment' => 'admin_dashboard-link']
);
}
Expand All @@ -70,7 +70,7 @@ public function getConfigUrl(): string
public function isChartEnabled(): bool
{
return $this->scopeConfig->isSetFlag(
static::XML_PATH_ENABLE_CHARTS,
self::XML_PATH_ENABLE_CHARTS,
ScopeInterface::SCOPE_STORE
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function isCategoryFilterVisibleInLayerNavigation(
}

return $this->scopeConfig->isSetFlag(
static::XML_PATH_CATALOG_LAYERED_NAVIGATION_DISPLAY_CATEGORY,
self::XML_PATH_CATALOG_LAYERED_NAVIGATION_DISPLAY_CATEGORY,
$scopeType,
$scopeCode
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,12 @@ protected function isRowValidSample(array $rowData)

foreach ($sampleData as $link) {
if ($this->hasDomainNotInWhitelist($link, 'link_type', 'link_url')) {
$this->_entityModel->addRowError(static::ERROR_LINK_URL_NOT_IN_DOMAIN_WHITELIST, $this->rowNum);
$this->_entityModel->addRowError(self::ERROR_LINK_URL_NOT_IN_DOMAIN_WHITELIST, $this->rowNum);
$result = true;
}

if ($this->hasDomainNotInWhitelist($link, 'sample_type', 'sample_url')) {
$this->_entityModel->addRowError(static::ERROR_SAMPLE_URL_NOT_IN_DOMAIN_WHITELIST, $this->rowNum);
$this->_entityModel->addRowError(self::ERROR_SAMPLE_URL_NOT_IN_DOMAIN_WHITELIST, $this->rowNum);
$result = true;
}
}
Expand Down Expand Up @@ -406,12 +406,12 @@ protected function isRowValidLink(array $rowData)

foreach ($linkData as $link) {
if ($this->hasDomainNotInWhitelist($link, 'link_type', 'link_url')) {
$this->_entityModel->addRowError(static::ERROR_LINK_URL_NOT_IN_DOMAIN_WHITELIST, $this->rowNum);
$this->_entityModel->addRowError(self::ERROR_LINK_URL_NOT_IN_DOMAIN_WHITELIST, $this->rowNum);
$result = true;
}

if ($this->hasDomainNotInWhitelist($link, 'sample_type', 'sample_url')) {
$this->_entityModel->addRowError(static::ERROR_SAMPLE_URL_NOT_IN_DOMAIN_WHITELIST, $this->rowNum);
$this->_entityModel->addRowError(self::ERROR_SAMPLE_URL_NOT_IN_DOMAIN_WHITELIST, $this->rowNum);
$result = true;
}
}
Expand Down

0 comments on commit effb34a

Please sign in to comment.