Skip to content

Commit

Permalink
4051 - moved frontend/scandipwa to a class constant and replaced doub…
Browse files Browse the repository at this point in the history
…le string quotes with single quotes
  • Loading branch information
Levan Apkhazava committed May 30, 2022
1 parent b5289e1 commit b6a1d73
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Block/Page/Footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ class Footer extends CoreFooter
{
const PACKAGE_JSON_FILE = 'package.json';

/**
* ScandiPWA registration theme component name
*/
const SCANDIPWA_COMPONENT_NAME = 'frontend/scandipwa';

/**
* @var ListInterface
*/
Expand Down Expand Up @@ -80,7 +85,7 @@ public function getPackageJsonData() {
$packageData = json_decode(file_get_contents($pathToTheme), true);
$this->scandiPWAPackgeVersion = $this->getScandiPWAFromPackageData($packageData);
} else {
$this->scandiPWAPackgeVersion = "n/a";
$this->scandiPWAPackgeVersion = 'n/a';
}
}

Expand All @@ -94,7 +99,7 @@ public function getScandiPWADirectoryPath() {
$themeDirectoryPath = null;

foreach ($this->themeList as $theme) {
if (str_contains($theme->getFullPath(), "frontend/scandipwa")) {
if (str_contains($theme->getFullPath(), self::SCANDIPWA_COMPONENT_NAME)) {
$themeDirectoryPath = $this->componentRegistrar->getPath(
ComponentRegistrar::THEME,
$theme->getFullPath()
Expand Down

0 comments on commit b6a1d73

Please sign in to comment.