Skip to content

Commit

Permalink
renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohdan Berezhniy committed Sep 11, 2023
1 parent f752962 commit d15a225
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getIsJavascriptLazyLoadMethod(): bool
/**
* @return bool
*/
public function getIsAllBlocksAddedToLazy(): bool
public function isAllBlocksAddedToLazy(): bool
{
return (BlocksToLazyLoad::ALL === (int)$this->getConfig(self::XML_PATH_LAZY_BLOCKS_TO_LAZY_LOAD));
}
Expand Down
6 changes: 3 additions & 3 deletions Plugin/BlockPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private function prepareForJsLazyLoad($block, string $html): string
* @param string $html
* @return string
*/
private function prepareForNativeBrowserLazyLoad(string $html) :string
protected function prepareForNativeBrowserLazyLoad(string $html) :string
{
return preg_replace(self::PATTERN, '<img src="$2" $1 $3 loading="lazy" />', $html);
}
Expand Down Expand Up @@ -177,7 +177,7 @@ protected function getBlockIdentifier(\Magento\Framework\View\Element\AbstractBl
* @param int $numberOfReplacements
* @return string
*/
private function removeLoadingLazyAttributeFromFirstNImages(string $html, int $numberOfReplacements):string
protected function removeLoadingLazyAttributeFromFirstNImages(string $html, int $numberOfReplacements):string
{
$position = 0;

Expand Down Expand Up @@ -225,7 +225,7 @@ protected function isEnabled($block, string $html): bool
return false;
}

if ($this->config->getIsAllBlocksAddedToLazy() && !$this->isBlockSkiped($block)) {
if ($this->config->isAllBlocksAddedToLazy() && !$this->isBlockSkiped($block)) {
return true;
}

Expand Down

0 comments on commit d15a225

Please sign in to comment.